class Polar::Base

Public Class Methods

new(data) click to toggle source
# File lib/polar/base.rb, line 4
def initialize(data)
  @data = data
end

Public Instance Methods

method_missing(method_name, *attrs) click to toggle source
# File lib/polar/base.rb, line 8
def method_missing(method_name, *attrs)
  if @data.has_key?(method_name.to_s)
    return @data[method_name.to_s] 
  else
    raise("No data for: #{method_name}")
  end 
end
to_h() click to toggle source
# File lib/polar/base.rb, line 16
def to_h
  @data
end