Class: Alchemist::Commands::Read
- Defined in:
- lib/alchemist-server/commands/read.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#initialize, #outcome, pattern, run
Constructor Details
This class inherits a constructor from Alchemist::Commands::Base
Instance Method Details
#run ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/alchemist-server/commands/read.rb', line 6 def run = history.world. avatar_name lines = .flat_map do |name, | ["#{name}:"] + + [''] end outcome((["messages #{lines.length}"] + lines + ['']).join("\n")) end |