class Somemoji::CommandBuilder
Public Class Methods
new(argv)
click to toggle source
@param argv [Array<String>]
# File lib/somemoji/command_builder.rb, line 4 def initialize(argv) @argv = argv end
Public Instance Methods
build()
click to toggle source
@return [Somemoji::Commands::BaseCommand]
# 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
Private Instance Methods
command_line_arguments()
click to toggle source
@return [Somemoji::CommandLineArguments]
# File lib/somemoji/command_builder.rb, line 20 def command_line_arguments @command_line_arguments ||= ::Somemoji::CommandLineArguments.new(@argv) end