Class: Message
- Inherits:
-
Object
- Object
- Message
- Defined in:
- lib/Rubbit/Rubbit_Objects.rb
Instance Method Summary collapse
-
#initialize(json) ⇒ Message
constructor
A new instance of Message.
- #reply(text) ⇒ Object
Constructor Details
#initialize(json) ⇒ Message
Returns a new instance of Message.
260 261 262 263 264 265 266 267 268 |
# File 'lib/Rubbit/Rubbit_Objects.rb', line 260 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
269 270 271 |
# File 'lib/Rubbit/Rubbit_Objects.rb', line 269 def reply(text) Rubbit_Poster.instance.comment(text,@name) end |