Class: FbGraph::Poke
- Inherits:
-
Object
- Object
- FbGraph::Poke
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/poke.rb
Instance Attribute Summary (collapse)
-
- (Object) created_time
Returns the value of attribute created_time.
-
- (Object) from
Returns the value of attribute from.
-
- (Object) to
Returns the value of attribute to.
Instance Method Summary (collapse)
-
- (Poke) initialize(attributes = {})
constructor
A new instance of Poke.
Methods included from Comparison
Constructor Details
- (Poke) initialize(attributes = {})
A new instance of Poke
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/fb_graph/poke.rb', line 7 def initialize(attributes = {}) if from = attributes[:from] @from = User.new from[:id], from end if to = attributes[:to] @to = User.new to[:id], to end if attributes[:created_time] @created_time = Time.parse attributes[:created_time] end end |
Instance Attribute Details
- (Object) created_time
Returns the value of attribute created_time
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def created_time @created_time end |
- (Object) from
Returns the value of attribute from
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def from @from end |
- (Object) to
Returns the value of attribute to
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def to @to end |