Class: Kilt
Overview
require ‘snarl’ if RUBY_PLATFORM =~ /mswin|mingw|win32/
Constant Summary collapse
- ICON =
File.(File.join(File.dirname(__FILE__), '..', 'img', 'pivotal.png'))
Instance Attribute Summary collapse
-
#date_last_activity ⇒ Object
readonly
Returns the value of attribute date_last_activity.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#date_last_activity ⇒ Object (readonly)
Returns the value of attribute date_last_activity.
9 10 11 |
# File 'lib/kilt.rb', line 9 def date_last_activity @date_last_activity end |
#id ⇒ Object (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
19 20 21 |
# File 'lib/kilt.rb', line 19 def self.init(token) new token end |
Instance Method Details
#pivotal_format_date ⇒ Object
23 24 25 |
# File 'lib/kilt.rb', line 23 def pivotal_format_date URI.escape(date_last_activity.strftime("%Y/%m/%d %H:%M:%S")) end |
#update ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/kilt.rb', line 27 def update activities = fetch_activities activities.reverse.each do |activity| if activity['occurred_at'] > @date_last_activity notify_about activity['description'] end end update_date_from activities end |