Class: WowArmory::Data::DataObject

Inherits:
Object
  • Object
show all
Defined in:
lib/wow_armory/data_object.rb

Direct Known Subclasses

Character, Guild, Item

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_data) ⇒ DataObject

Returns a new instance of DataObject.



5
6
7
# File 'lib/wow_armory/data_object.rb', line 5

def initialize(raw_data)
  @data = raw_data
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method) ⇒ Object



9
10
11
# File 'lib/wow_armory/data_object.rb', line 9

def method_missing(method)
  return @data[method.to_s]
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



4
5
6
# File 'lib/wow_armory/data_object.rb', line 4

def data
  @data
end