Class: Flumtter::TimeLine::FavBase

Inherits:
Event
  • Object
show all
Defined in:
lib/flumtter/app/plugins/timeline/fav.rb

Direct Known Subclasses

Favorite, UnFavorite

Instance Method Summary collapse

Methods inherited from Event

#header

Methods inherited from Base

[], #initialize, #to_s

Methods included from Util

#command_value_regexp, #dialog_for_index, #error, #error_handler, #id2obj, #if_tweet, #index_regexp, #index_with_dialog, #logger, #on_event, #parse_index, #parse_time, #sarastire, #sarastire_user, #screen_name_regexp

Constructor Details

This class inherits a constructor from Flumtter::TimeLine::Base

Instance Method Details

#bodyObject



22
23
24
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 22

def body
  @object.target_object.text.nl
end

#created_atObject



18
19
20
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 18

def created_at
  parse_time(@object.target_object.created_at)
end


26
27
28
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 26

def footer
  "#{created_at}".ljust(Terminal.x, nil, @object.target_object.via)
end

#infoObject



10
11
12
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 10

def info
  @object.target_object.favorite_count
end

#source_userObject



6
7
8
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 6

def source_user
  @object.source.screen_name
end

#userObject



14
15
16
# File 'lib/flumtter/app/plugins/timeline/fav.rb', line 14

def user
  "#{@object.target_object.user.name} (@#{@object.target_object.user.screen_name})"
end