Class: Somemoji::CommandBuilder
- Inherits:
-
Object
- Object
- Somemoji::CommandBuilder
- Defined in:
- lib/somemoji/command_builder.rb
Instance Method Summary collapse
- #build ⇒ Somemoji::Commands::BaseCommand
-
#initialize(argv) ⇒ CommandBuilder
constructor
A new instance of CommandBuilder.
Constructor Details
#initialize(argv) ⇒ CommandBuilder
Returns a new instance of CommandBuilder.
4 5 6 |
# File 'lib/somemoji/command_builder.rb', line 4 def initialize(argv) @argv = argv end |
Instance Method Details
#build ⇒ Somemoji::Commands::BaseCommand
9 10 11 12 13 14 15 |
# File 'lib/somemoji/command_builder.rb', line 9 def build if command_line_arguments.valid? ::Somemoji::Commands::ExtractCommand.new(command_line_arguments) else ::Somemoji::Commands::ErrorCommand.new(command_line_arguments) end end |