class Docomoru::CommandBuilder

Public Class Methods

new(argv) click to toggle source
# File lib/docomoru/command_builder.rb, line 7
def initialize(argv)
  @argv = argv
end

Public Instance Methods

call() click to toggle source
# File lib/docomoru/command_builder.rb, line 11
def call
  if arguments.valid?
    Commands::Request.new(arguments)
  else
    Commands::Error.new(arguments)
  end
end

Private Instance Methods

arguments() click to toggle source
# File lib/docomoru/command_builder.rb, line 21
def arguments
  @arguments ||= Arguments.new(@argv)
end