Class: Gapic::Schema::RequestParameter
- Inherits:
-
Object
- Object
- Gapic::Schema::RequestParameter
- Defined in:
- lib/gapic/schema/request_parameter.rb
Overview
Encapsulates information that is parsed from a single command line parameter from the plugin_opt command line
Instance Attribute Summary collapse
-
#config_name ⇒ Object
readonly
Returns the value of attribute config_name.
-
#config_value ⇒ Object
readonly
Returns the value of attribute config_value.
-
#input_name ⇒ Object
readonly
Returns the value of attribute input_name.
-
#input_str ⇒ Object
readonly
Returns the value of attribute input_str.
-
#input_value ⇒ Object
readonly
Returns the value of attribute input_value.
Instance Method Summary collapse
-
#initialize(input_str, input_name, input_value, config_name, config_value) ⇒ RequestParameter
constructor
A new instance of RequestParameter.
-
#to_config_h ⇒ Hash {String => String, Array, Hash}
The hash of config name-value.
-
#to_input_h ⇒ Hash {String => String}
The hash of input name-value.
Constructor Details
#initialize(input_str, input_name, input_value, config_name, config_value) ⇒ RequestParameter
Returns a new instance of RequestParameter.
35 36 37 38 39 40 41 |
# File 'lib/gapic/schema/request_parameter.rb', line 35 def initialize input_str, input_name, input_value, config_name, config_value @input_str = input_str @input_name = input_name @input_value = input_value @config_name = config_name @config_value = config_value end |
Instance Attribute Details
#config_name ⇒ Object (readonly)
Returns the value of attribute config_name.
25 26 27 |
# File 'lib/gapic/schema/request_parameter.rb', line 25 def config_name @config_name end |
#config_value ⇒ Object (readonly)
Returns the value of attribute config_value.
26 27 28 |
# File 'lib/gapic/schema/request_parameter.rb', line 26 def config_value @config_value end |
#input_name ⇒ Object (readonly)
Returns the value of attribute input_name.
23 24 25 |
# File 'lib/gapic/schema/request_parameter.rb', line 23 def input_name @input_name end |
#input_str ⇒ Object (readonly)
Returns the value of attribute input_str.
22 23 24 |
# File 'lib/gapic/schema/request_parameter.rb', line 22 def input_str @input_str end |
#input_value ⇒ Object (readonly)
Returns the value of attribute input_value.
24 25 26 |
# File 'lib/gapic/schema/request_parameter.rb', line 24 def input_value @input_value end |
Instance Method Details
#to_config_h ⇒ Hash {String => String, Array, Hash}
The hash of config name-value
51 52 53 |
# File 'lib/gapic/schema/request_parameter.rb', line 51 def to_config_h { config_name => config_value } end |
#to_input_h ⇒ Hash {String => String}
The hash of input name-value
45 46 47 |
# File 'lib/gapic/schema/request_parameter.rb', line 45 def to_input_h { input_name => input_value } end |