class Ncba::Object
Public Class Methods
new(attributes)
click to toggle source
# File lib/ncba/object.rb, line 8 def initialize(attributes) @attributes = OpenStruct.new(attributes) end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/ncba/object.rb, line 12 def method_missing(method, *args, &block) attribute = @attributes.send(method, *args, &block) attribute.is_a?(Hash) ? Object.new(attribute) : attribute end
respond_to_missing?(_method, _include_private = false)
click to toggle source
# File lib/ncba/object.rb, line 17 def respond_to_missing?(_method, _include_private = false) true end