Class: Spider::QueryFuncs::Substr

Inherits:
UnaryFunction show all
Defined in:
lib/spiderfw/model/query_funcs.rb

Instance Attribute Summary collapse

Attributes inherited from Function

#mapper_fields

Instance Method Summary collapse

Methods inherited from UnaryFunction

#elements

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

#lengthObject (readonly)

Returns the value of attribute length.



142
143
144
# File 'lib/spiderfw/model/query_funcs.rb', line 142

def length
  @length
end

#startObject (readonly)

Returns the value of attribute start.



142
143
144
# File 'lib/spiderfw/model/query_funcs.rb', line 142

def start
  @start
end