Class: Breaktime::CLI
- Inherits:
-
Object
- Object
- Breaktime::CLI
- Defined in:
- lib/breaktime/cli.rb
Constant Summary collapse
- SUB_COMMANDS =
Available sub commands (modes) for CLI.
%w(start stop dialog now)
- HOME =
Default location of YAML config file.
ENV['HOME'] + File::SEPARATOR
- DEFAULT_CONFIG =
HOME + '.breaktime.yml'
Instance Attribute Summary collapse
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize ⇒ CLI
constructor
A new instance of CLI.
Constructor Details
#initialize ⇒ CLI
Returns a new instance of CLI.
13 14 15 16 |
# File 'lib/breaktime/cli.rb', line 13 def initialize @options = @mode = ARGV.shift || 'start' end |
Instance Attribute Details
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
4 5 6 |
# File 'lib/breaktime/cli.rb', line 4 def mode @mode end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/breaktime/cli.rb', line 4 def @options end |