class Smite::Object
Attributes
data[R]
Public Class Methods
new(data)
click to toggle source
# File lib/smite/object.rb, line 5 def initialize(data) @data = data.each_with_object({}) do |(k, v), obj| next if k == 'ret_msg' obj[ActiveSupport::Inflector.underscore(k)] = v end end
Public Instance Methods
attributes()
click to toggle source
# File lib/smite/object.rb, line 12 def attributes @data.keys end
method_missing(method)
click to toggle source
Calls superclass method
# File lib/smite/object.rb, line 16 def method_missing(method) camel_method = ActiveSupport::Inflector.underscore(method.to_s) @data.include?(camel_method) ? @data[camel_method] : super end