Module: Toar::Ar

Defined in:
lib/toar.rb

Defined Under Namespace

Modules: Instance

Instance Method Summary collapse

Instance Method Details

#to_ar(json) ⇒ Object



73
74
75
# File 'lib/toar.rb', line 73

def to_ar(json)
  Toar.to_ar(self, json)
end

#toar(opt = {}) ⇒ Object



67
68
69
70
71
# File 'lib/toar.rb', line 67

def toar(opt = {})
  @toar_opt ||= {}
  @toar_opt[(opt[:name] || '').to_sym] = opt
  include Instance
end

#toar_opt(name = '') ⇒ Object



77
78
79
# File 'lib/toar.rb', line 77

def toar_opt(name = '')
  @toar_opt[name.to_sym]
end