Class: Pechkin::Command::List

Inherits:
Base
  • Object
show all
Defined in:
lib/pechkin/command/list.rb

Overview

List channels configuration

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#configuration, #handler, #initialize, #puts, #warn

Constructor Details

This class inherits a constructor from Pechkin::Command::Base

Instance Method Details

#executeObject



12
13
14
15
16
17
18
# File 'lib/pechkin/command/list.rb', line 12

def execute
  cfg = configuration

  puts "Working dir: #{cfg.working_dir}"
  print_bots(cfg.bots)
  print_channels(cfg.channels)
end

#matches?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/pechkin/command/list.rb', line 8

def matches?
  options.list?
end