Class: Breaktime::CLI

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeCLI

Returns a new instance of CLI.



13
14
15
16
# File 'lib/breaktime/cli.rb', line 13

def initialize
  @options = parse_cli_options
  @mode = ARGV.shift || 'start'
end

Instance Attribute Details

#modeObject (readonly)

Returns the value of attribute mode.



4
5
6
# File 'lib/breaktime/cli.rb', line 4

def mode
  @mode
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/breaktime/cli.rb', line 4

def options
  @options
end