Module: Twterm::Notification::Base

Included in:
Error, Message
Defined in:
lib/twterm/notification/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#bg_colorObject (readonly)

Returns the value of attribute bg_color.



4
5
6
# File 'lib/twterm/notification/base.rb', line 4

def bg_color
  @bg_color
end

#fg_colorObject (readonly)

Returns the value of attribute fg_color.



4
5
6
# File 'lib/twterm/notification/base.rb', line 4

def fg_color
  @fg_color
end

#timeObject (readonly)

Returns the value of attribute time.



4
5
6
# File 'lib/twterm/notification/base.rb', line 4

def time
  @time
end

Instance Method Details

#initialize(message) ⇒ Object



6
7
8
9
# File 'lib/twterm/notification/base.rb', line 6

def initialize(message)
  @message = message
  @time = Time.now
end

#show_with_width(width) ⇒ Object



11
12
13
# File 'lib/twterm/notification/base.rb', line 11

def show_with_width(width)
  @message.gsub("\n", ' ')
end