Class: RailsFormation::Cli::Processor

Inherits:
Object
  • Object
show all
Defined in:
lib/rails-formation/cli/processor.rb

Constant Summary collapse

COMMANDS =
%w[apply].freeze
InvalidCommand =
Class.new(StandardError)
InvalidUid =
Class.new(StandardError)

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Processor

Returns a new instance of Processor.



11
12
13
14
# File 'lib/rails-formation/cli/processor.rb', line 11

def initialize(args)
  @command = args[0]
  @uid = args[1]
end

Instance Method Details

#callObject



16
17
18
19
20
# File 'lib/rails-formation/cli/processor.rb', line 16

def call
  validate_command

  ::RailsFormation.apply(adapter.template)
end