Class: Sqreen::Util::Capper
- Inherits:
-
Object
- Object
- Sqreen::Util::Capper
- Defined in:
- lib/sqreen/util/capper.rb
Instance Attribute Summary collapse
-
#depth_cap ⇒ Object
readonly
Returns the value of attribute depth_cap.
-
#size_cap ⇒ Object
readonly
Returns the value of attribute size_cap.
-
#string_size_cap ⇒ Object
readonly
Returns the value of attribute string_size_cap.
Instance Method Summary collapse
- #call(e) ⇒ Object
-
#initialize(opts = {}) ⇒ Capper
constructor
A new instance of Capper.
Constructor Details
#initialize(opts = {}) ⇒ Capper
Returns a new instance of Capper.
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/sqreen/util/capper.rb', line 14 def initialize(opts = {}) string_size_cap = opts[:string_size_cap] || 4096 size_cap = opts[:size_cap] || 150 depth_cap = opts[:depth_cap] || 10 flat_size_cap = opts[:flat_size_cap] || 10000 @string_size_cap = string_size_cap @size_cap = size_cap @depth_cap = depth_cap @flat_size_cap = flat_size_cap end |
Instance Attribute Details
#depth_cap ⇒ Object (readonly)
Returns the value of attribute depth_cap.
12 13 14 |
# File 'lib/sqreen/util/capper.rb', line 12 def depth_cap @depth_cap end |
#size_cap ⇒ Object (readonly)
Returns the value of attribute size_cap.
12 13 14 |
# File 'lib/sqreen/util/capper.rb', line 12 def size_cap @size_cap end |
#string_size_cap ⇒ Object (readonly)
Returns the value of attribute string_size_cap.
12 13 14 |
# File 'lib/sqreen/util/capper.rb', line 12 def string_size_cap @string_size_cap end |
Instance Method Details
#call(e) ⇒ Object
26 27 28 |
# File 'lib/sqreen/util/capper.rb', line 26 def call(e) r_call(e).first end |