Class: Part
- Inherits:
- Rubot::Core::Command show all
- Defined in:
- lib/template/commands/part.rb
Instance Method Summary collapse
Methods inherited from Rubot::Core::Command
#initialize, #protected?, #run
Constructor Details
This class inherits a constructor from Rubot::Core::Command
Instance Method Details
#execute(server, message, options) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/template/commands/part.rb', line 4 def execute(server, , ) if .body.empty? server.part(.destination) else server.part(.body) end end |