Class: OmfEc::Graph::MSBuilder

Inherits:
Object
  • Object
show all
Defined in:
omf_ec/lib/omf_ec/graph/graph_description.rb

Instance Method Summary (collapse)

Constructor Details

- (MSBuilder) initialize(data_set)

Returns a new instance of MSBuilder



147
148
149
# File 'omf_ec/lib/omf_ec/graph/graph_description.rb', line 147

def initialize(data_set)
  @data_set = data_set
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

- (Object) method_missing(symbol, *args, &block)



151
152
153
154
155
156
157
158
159
160
# File 'omf_ec/lib/omf_ec/graph/graph_description.rb', line 151

def method_missing(symbol, *args, &block)
  debug "Calling #{symbol}::#{args.inspect}"
  res = @data_set.send(symbol, *args, &block)
  if res.is_a? Sequel::Postgres::Dataset
    @data_set = res
    res = self
  end
  debug "Result: #{res.class}"
  res
end