Class: Somemoji::CommandLineArguments
- Inherits:
-
Object
- Object
- Somemoji::CommandLineArguments
- Defined in:
- lib/somemoji/command_line_arguments.rb
Instance Method Summary collapse
- #destination ⇒ String
- #error_message ⇒ String
- #format ⇒ String?
-
#initialize(argv) ⇒ CommandLineArguments
constructor
A new instance of CommandLineArguments.
- #provider_name ⇒ String
- #size ⇒ Integer?
- #valid? ⇒ Boolean
Constructor Details
#initialize(argv) ⇒ CommandLineArguments
Returns a new instance of CommandLineArguments.
4 5 6 |
# File 'lib/somemoji/command_line_arguments.rb', line 4 def initialize(argv) @argv = argv end |
Instance Method Details
#destination ⇒ String
9 10 11 |
# File 'lib/somemoji/command_line_arguments.rb', line 9 def destination slop_parse_result[:destination] end |
#error_message ⇒ String
14 15 16 |
# File 'lib/somemoji/command_line_arguments.rb', line 14 def .to_s end |
#format ⇒ String?
19 20 21 |
# File 'lib/somemoji/command_line_arguments.rb', line 19 def format slop_parse_result[:format] end |
#provider_name ⇒ String
24 25 26 |
# File 'lib/somemoji/command_line_arguments.rb', line 24 def provider_name slop_parse_result[:provider] end |
#size ⇒ Integer?
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 |