Class: TARS::Update

Inherits:
Object
  • Object
show all
Defined in:
lib/tars/update.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(update) ⇒ Update

Returns a new instance of Update.



7
8
9
10
11
12
# File 'lib/tars/update.rb', line 7

def initialize(update)
  update.each do |k, v|
    instance_variable_set("@#{k}", v) unless v.nil?
  end
  TARS.bot.execute(@message['text'], self)
end

Class Attribute Details

.messageObject (readonly)

Returns the value of attribute message.



4
5
6
# File 'lib/tars/update.rb', line 4

def message
  @message
end

.update_idObject (readonly)

Returns the value of attribute update_id.



4
5
6
# File 'lib/tars/update.rb', line 4

def update_id
  @update_id
end