Class: Callstacking::Rails::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/callstacking/rails/cli.rb

Constant Summary collapse

REGISTER =
'register'
SETUP =
'setup'
ENABLE =
'enable'
DISABLE =
'disable'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, settings) ⇒ Cli

Returns a new instance of Cli.



11
12
13
14
# File 'lib/callstacking/rails/cli.rb', line 11

def initialize(action, settings)
  @action = action
  @settings = settings
end

Instance Attribute Details

#actionObject (readonly)

Returns the value of attribute action.



9
10
11
# File 'lib/callstacking/rails/cli.rb', line 9

def action
  @action
end

#settingsObject (readonly)

Returns the value of attribute settings.



9
10
11
# File 'lib/callstacking/rails/cli.rb', line 9

def settings
  @settings
end

Class Method Details

.action(args) ⇒ Object



20
21
22
# File 'lib/callstacking/rails/cli.rb', line 20

def self.action(args)
  args[0]&.downcase&.strip
end

Instance Method Details

#runObject



16
17
18
# File 'lib/callstacking/rails/cli.rb', line 16

def run
  parse_options
end