Class: Kilt

Inherits:
Object
  • Object
show all
Includes:
Crack
Defined in:
lib/kilt.rb

Constant Summary collapse

ICON =
File.expand_path(File.join(File.dirname(__FILE__), '..', 'img', 'pivotal.png'))

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/kilt.rb', line 9

def id
  @id
end

Class Method Details

.init(token) ⇒ Object



13
14
15
# File 'lib/kilt.rb', line 13

def self.init(token) 
  new token
end

Instance Method Details

#updateObject



17
18
19
20
21
22
23
24
25
# File 'lib/kilt.rb', line 17

def update
  activities = fetch_activities
  activities.reverse.each do |activity|
    if activity['id'] > @id.to_i
      notify_about activity['description']
    end
  end
  update_id_from activities
end