Class: Pupil::Stream::Status

Inherits:
Pupil::Status show all
Defined in:
lib/pupil/stream/base.rb

Overview

Stream Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Pupil::Status

#destroy, #entities, #retweet, #retweeted_by, #retweeted_by_user_ids, #retweets, #source, #user

Methods inherited from Pupil::Scheme

#params

Methods included from Essentials

#get, #guess_parameter, #post, #serialize_parameter

Constructor Details

#initialize(status, access_token, event = nil) ⇒ Status

Returns a new instance of Status.



93
94
95
96
97
# File 'lib/pupil/stream/base.rb', line 93

def initialize(status, access_token, event=nil)
  super(status, access_token)
  @event = (event)? event : :status
  @retweeted_status = (event == :retweeted)? status["retweeted_status"] : nil
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Pupil::Scheme

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



90
91
92
# File 'lib/pupil/stream/base.rb', line 90

def event
  @event
end

#retweeted_statusObject (readonly)

Returns the value of attribute retweeted_status.



91
92
93
# File 'lib/pupil/stream/base.rb', line 91

def retweeted_status
  @retweeted_status
end