class SmartRecruiters::Object

Public Class Methods

new(attributes) click to toggle source
# File lib/smartrecruiters/object.rb, line 7
def initialize(attributes)
  @attributes = OpenStruct.new(attributes)
end

Public Instance Methods

method_missing(method, *args, &block) click to toggle source
# File lib/smartrecruiters/object.rb, line 11
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/smartrecruiters/object.rb, line 16
def respond_to_missing?(_method, _include_private = false)
  true
end