Class: Plugins::Seen::SeenStruct
- Inherits:
-
Struct
- Object
- Struct
- Plugins::Seen::SeenStruct
- Includes:
- ActionView::Helpers::DateHelper
- Defined in:
- lib/Zeta/plugins/seen.rb
Instance Attribute Summary collapse
-
#time ⇒ Object
Returns the value of attribute time.
-
#what ⇒ Object
Returns the value of attribute what.
-
#where ⇒ Object
Returns the value of attribute where.
-
#who ⇒ Object
Returns the value of attribute who.
Instance Method Summary collapse
Instance Attribute Details
#time ⇒ Object
Returns the value of attribute time
4 5 6 |
# File 'lib/Zeta/plugins/seen.rb', line 4 def time @time end |
#what ⇒ Object
Returns the value of attribute what
4 5 6 |
# File 'lib/Zeta/plugins/seen.rb', line 4 def what @what end |
#where ⇒ Object
Returns the value of attribute where
4 5 6 |
# File 'lib/Zeta/plugins/seen.rb', line 4 def where @where end |
#who ⇒ Object
Returns the value of attribute who
4 5 6 |
# File 'lib/Zeta/plugins/seen.rb', line 4 def who @who end |
Instance Method Details
#to_s ⇒ Object
6 7 8 9 10 |
# File 'lib/Zeta/plugins/seen.rb', line 6 def to_s # "[#{time.asctime}] #{who} was seen in #{where} last saying #{what}" time_ago = time_ago_in_words(Time.at(time)) "[ \x1F#{where.to_s.upcase}\x0F ] \x0304#{who}\x0F: \"\x0303#{what[0..300]}\x0F\" \x02#{time_ago}\x0F ago" end |