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

#aggregate?, #as, #elements, func_name, #func_name, #has_aggregates?, inherited, #inner_elements, #inspect

Constructor Details

#initialize(el, start, length = nil) ⇒ Substr

Returns a new instance of Substr.



188
189
190
191
192
# File 'lib/spiderfw/model/query_funcs.rb', line 188

def initialize(el, start, length=nil)
    @el = el
    @start = start
    @length = length
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length.



186
187
188
# File 'lib/spiderfw/model/query_funcs.rb', line 186

def length
  @length
end

#startObject (readonly)

Returns the value of attribute start.



186
187
188
# File 'lib/spiderfw/model/query_funcs.rb', line 186

def start
  @start
end