Class: Somemoji::CommandLineArguments

Inherits:
Object
  • Object
show all
Defined in:
lib/somemoji/command_line_arguments.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv) ⇒ CommandLineArguments


4
5
6
# File 'lib/somemoji/command_line_arguments.rb', line 4

def initialize(argv)
  @argv = argv
end

Instance Method Details

#destinationString


9
10
11
# File 'lib/somemoji/command_line_arguments.rb', line 9

def destination
  slop_parse_result[:destination]
end

#error_messageString


14
15
16
# File 'lib/somemoji/command_line_arguments.rb', line 14

def error_message
  slop_options.to_s
end

#formatString?


19
20
21
# File 'lib/somemoji/command_line_arguments.rb', line 19

def format
  slop_parse_result[:format]
end

#provider_nameString


24
25
26
# File 'lib/somemoji/command_line_arguments.rb', line 24

def provider_name
  slop_parse_result[:provider]
end

#sizeInteger?


29
30
31
# File 'lib/somemoji/command_line_arguments.rb', line 29

def size
  slop_parse_result[:size]
end

#valid?Boolean


34
35
36
# File 'lib/somemoji/command_line_arguments.rb', line 34

def valid?
   command_name == "extract" && !slop_parse_result.nil?
end