Class: Pupil::User

Inherits:
Scheme show all
Defined in:
lib/pupil/schemes.rb

Direct Known Subclasses

Stream::User

Instance Method Summary collapse

Methods inherited from Scheme

#initialize, #params

Methods included from Essentials

#get, #guess_parameter, #post, #serialize_parameter

Constructor Details

This class inherits a constructor from Pupil::Scheme

Dynamic Method Handling

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

Instance Method Details

#reply(sentence, status = nil) ⇒ Object



26
27
28
29
30
31
32
33
# File 'lib/pupil/schemes.rb', line 26

def reply(sentence, status=nil)
  response = self.post(
    "statuses/update.json",
    "status"=> "@#{@element[:screen_name]} #{sentence}",
    "in_reply_to_status_id" => status
  )
  return response
end

#statusObject



22
23
24
# File 'lib/pupil/schemes.rb', line 22

def status
  Pupil::Status.new(@element["status"], @access_token) rescue nil
end