Class: Spider::QueryFuncs::Substr
- Inherits:
-
UnaryFunction
- Object
- Function
- UnaryFunction
- Spider::QueryFuncs::Substr
- Defined in:
- lib/spiderfw/model/query_funcs.rb
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Attributes inherited from Function
Instance Method Summary collapse
-
#initialize(el, start, length = nil) ⇒ Substr
constructor
A new instance of Substr.
Methods inherited from UnaryFunction
Methods inherited from Function
#elements, func_name, #func_name, inherited, #inner_elements
Constructor Details
#initialize(el, start, length = nil) ⇒ Substr
Returns a new instance of Substr.
144 145 146 147 148 |
# File 'lib/spiderfw/model/query_funcs.rb', line 144 def initialize(el, start, length=nil) @el = el @start = start @length = length end |
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
142 143 144 |
# File 'lib/spiderfw/model/query_funcs.rb', line 142 def length @length end |
#start ⇒ Object (readonly)
Returns the value of attribute start.
142 143 144 |
# File 'lib/spiderfw/model/query_funcs.rb', line 142 def start @start end |