Module: Sistrix::Record

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



7
8
9
10
11
# File 'lib/sistrix/record.rb', line 7

def method_missing(name)
  raise Sistrix::ArgumentException.new("there is no data field called \"#{name}\" here!") unless @data.has_key?(name.to_sym)

  @data[name]
end

Instance Method Details

#keysObject



3
4
5
# File 'lib/sistrix/record.rb', line 3

def keys
  @data.keys
end