Class: Mailbot::Commands::List
- Defined in:
- lib/mailbot/commands/list.rb
Constant Summary collapse
- DEFAULT_MARKDOWN_FILE =
"index.md"
Instance Method Summary collapse
-
#execute ⇒ Object
List all entries of the specified file.
-
#initialize(argv) ⇒ List
constructor
A new instance of List.
Constructor Details
#initialize(argv) ⇒ List
Returns a new instance of List.
8 9 10 |
# File 'lib/mailbot/commands/list.rb', line 8 def initialize(argv) @argv = argv end |
Instance Method Details
#execute ⇒ Object
List all entries of the specified file
13 14 15 |
# File 'lib/mailbot/commands/list.rb', line 13 def execute puts Mailbot::Repository.new(file).entries.map { |entry| colorized_subject entry }.map(&:strip).join("\n") end |