Class: FbGraph::Poke
- Inherits:
-
Object
- Object
- FbGraph::Poke
- Includes:
- Comparison
- Defined in:
- lib/fb_graph/poke.rb
Instance Attribute Summary collapse
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Poke
constructor
A new instance of Poke.
Methods included from Comparison
Constructor Details
#initialize(attributes = {}) ⇒ Poke
Returns 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
#created_time ⇒ Object
Returns the value of attribute created_time.
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def created_time @created_time end |
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def from @from end |
#to ⇒ Object
Returns the value of attribute to.
5 6 7 |
# File 'lib/fb_graph/poke.rb', line 5 def to @to end |