Class: Message

Inherits:
Object
  • Object
show all
Defined in:
lib/Rubbit/Rubbit_Objects.rb

Overview

Rubbit Object

Object that represents a Personal Message

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Message

Returns a new instance of Message.



650
651
652
653
654
655
656
657
658
# File 'lib/Rubbit/Rubbit_Objects.rb', line 650

def initialize(json)
  if(json['kind']=='t4')
    data = json['data']
    data.each_key do |k|
      self.class.module_eval {attr_accessor(k)}
      self.send("#{k}=",data[k])
    end
  end
end

Instance Method Details

#reply(text) ⇒ Object

Description

Responds to an inbox message.

Attributes

  • text - The new message body.



668
669
670
# File 'lib/Rubbit/Rubbit_Objects.rb', line 668

def reply(text)
  return Rubbit_Poster.instance.comment(@name,text)
end