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.
232 233 234 235 236 237 238 239 240 |
# File 'lib/Rubbit/Rubbit_Objects.rb', line 232 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
241 242 243 |
# File 'lib/Rubbit/Rubbit_Objects.rb', line 241 def reply(text) Rubbit_Poster.instance.comment(text,@name) end |