Class: Chat::DotCommand::Shrug
- Inherits:
-
Object
- Object
- Chat::DotCommand::Shrug
- Defined in:
- app/models/chat/dot_command/shrug.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(message, text) ⇒ Shrug
constructor
A new instance of Shrug.
- #perform ⇒ Object
Constructor Details
#initialize(message, text) ⇒ Shrug
Returns a new instance of Shrug.
8 9 10 11 |
# File 'app/models/chat/dot_command/shrug.rb', line 8 def initialize(, text) @message = @text = text end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'app/models/chat/dot_command/shrug.rb', line 6 def @message end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
6 7 8 |
# File 'app/models/chat/dot_command/shrug.rb', line 6 def text @text end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/models/chat/dot_command/shrug.rb', line 13 def perform .text = if text.blank? shruggie else "#{text} #{shruggie}" end end |