Class: Spider::QueryFuncs::SelectFunction

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(function, as) ⇒ SelectFunction

Returns a new instance of SelectFunction.



107
108
109
110
# File 'lib/spiderfw/model/query_funcs.rb', line 107

def initialize(function, as)
    @function = function
    @as = as
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



116
117
118
# File 'lib/spiderfw/model/query_funcs.rb', line 116

def method_missing(method, *args)
    @function.send(method, *args)
end

Instance Attribute Details

#asObject (readonly)

Returns the value of attribute as.



104
105
106
# File 'lib/spiderfw/model/query_funcs.rb', line 104

def as
  @as
end

#functionObject (readonly)

Returns the value of attribute function.



104
105
106
# File 'lib/spiderfw/model/query_funcs.rb', line 104

def function
  @function
end

Instance Method Details

#inspectObject



112
113
114
# File 'lib/spiderfw/model/query_funcs.rb', line 112

def inspect
    "#{@function.inspect} AS #{@as}"
end