Class: FacebookSession::DecodeableStruct
- Inherits:
-
Object
- Object
- FacebookSession::DecodeableStruct
- Defined in:
- lib/facebook_session/decodeable_struct.rb
Direct Known Subclasses
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data = {}) ⇒ DecodeableStruct
constructor
A new instance of DecodeableStruct.
Constructor Details
#initialize(data = {}) ⇒ DecodeableStruct
Returns a new instance of DecodeableStruct.
9 10 11 12 13 14 15 |
# File 'lib/facebook_session/decodeable_struct.rb', line 9 def initialize(data={}) data.each do |key, value| if self.respond_to?("#{key.to_s}=".to_sym) self.send("#{key.to_s}=".to_sym, value) end end end |
Class Method Details
.decode(message) ⇒ Object
4 5 6 |
# File 'lib/facebook_session/decodeable_struct.rb', line 4 def decode() self.new(FacebookSession..decode()) end |