Class: CaptainHoog::Message
- Inherits:
-
Object
- Object
- CaptainHoog::Message
- Defined in:
- lib/captain_hoog/message.rb
Instance Method Summary collapse
- #call(no_color: true) ⇒ Object
-
#initialize(color, body) ⇒ Message
constructor
A new instance of Message.
- #message ⇒ Object
Constructor Details
#initialize(color, body) ⇒ Message
Returns a new instance of Message.
4 5 6 7 |
# File 'lib/captain_hoog/message.rb', line 4 def initialize(color, body) @body = body @color = color end |
Instance Method Details
#call(no_color: true) ⇒ Object
9 10 11 |
# File 'lib/captain_hoog/message.rb', line 9 def call(no_color: true) (no_color || will_have_no_color) ? : .send(@color) end |
#message ⇒ Object
13 14 15 16 17 |
# File 'lib/captain_hoog/message.rb', line 13 def = @body.call check_msg() end |