Module: Webspicy::Support::DataObject
Instance Method Summary
collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &bl) ⇒ Object
11
12
13
14
15
16
17
|
# File 'lib/webspicy/support/data_object.rb', line 11
def method_missing(name, *args, &bl)
if @raw.has_key?(name) && args.empty? && bl.nil?
@raw[name]
else
super
end
end
|
Instance Method Details
#initialize(raw) ⇒ Object
5
6
7
|
# File 'lib/webspicy/support/data_object.rb', line 5
def initialize(raw)
@raw = raw
end
|
#to_info ⇒ Object
19
20
21
|
# File 'lib/webspicy/support/data_object.rb', line 19
def to_info
@raw
end
|