Class: Hanami::CLI::Parser::Result Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Parser::Result
- Defined in:
- lib/hanami/cli/parser.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #arguments ⇒ Object readonly private
- #error ⇒ Object readonly private
Class Method Summary collapse
- .failure(error = "Error: Invalid param provided") ⇒ Object private
- .help ⇒ Object private
- .success(arguments = {}) ⇒ Object private
Instance Method Summary collapse
- #error? ⇒ Boolean private
- #help? ⇒ Boolean private
-
#initialize(arguments: {}, error: nil, help: false) ⇒ Result
constructor
private
A new instance of Result.
Constructor Details
#initialize(arguments: {}, error: nil, help: false) ⇒ Result
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Result.
122 123 124 125 126 |
# File 'lib/hanami/cli/parser.rb', line 122 def initialize(arguments: {}, error: nil, help: false) @arguments = arguments @error = error @help = help end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
114 115 116 |
# File 'lib/hanami/cli/parser.rb', line 114 def arguments @arguments end |
#error ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
118 119 120 |
# File 'lib/hanami/cli/parser.rb', line 118 def error @error end |
Class Method Details
.failure(error = "Error: Invalid param provided") ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
108 109 110 |
# File 'lib/hanami/cli/parser.rb', line 108 def self.failure(error = "Error: Invalid param provided") new(error: error) end |
.help ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
96 97 98 |
# File 'lib/hanami/cli/parser.rb', line 96 def self.help new(help: true) end |
.success(arguments = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
102 103 104 |
# File 'lib/hanami/cli/parser.rb', line 102 def self.success(arguments = {}) new(arguments: arguments) end |
Instance Method Details
#error? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
130 131 132 |
# File 'lib/hanami/cli/parser.rb', line 130 def error? !error.nil? end |
#help? ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
136 137 138 |
# File 'lib/hanami/cli/parser.rb', line 136 def help? @help end |