Class: ForemanRemoteExecution::ProviderInput
- Inherits:
-
Object
- Object
- ForemanRemoteExecution::ProviderInput
- Defined in:
- app/lib/foreman_remote_execution/provider_input.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#required ⇒ Object
readonly
Returns the value of attribute required.
-
#value ⇒ Object
Returns the value of attribute value.
-
#value_type ⇒ Object
readonly
Returns the value of attribute value_type.
Instance Method Summary collapse
- #hidden_value? ⇒ Boolean
-
#initialize(name:, label:, value:, description: nil, options: nil, value_type: nil, required: false, hidden: false) ⇒ ProviderInput
constructor
A new instance of ProviderInput.
- #options_array ⇒ Object
- #template_input ⇒ Object
Constructor Details
#initialize(name:, label:, value:, description: nil, options: nil, value_type: nil, required: false, hidden: false) ⇒ ProviderInput
Returns a new instance of ProviderInput.
6 7 8 9 10 11 12 13 14 15 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 6 def initialize(name:, label:, value:, description: nil, options: nil, value_type: nil, required: false, hidden: false) @name = name @label = label @value = value @description = description @options = @value_type = value_type @required = required @hidden = hidden end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def description @description end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def @options end |
#required ⇒ Object (readonly)
Returns the value of attribute required.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def required @required end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 4 def value @value end |
#value_type ⇒ Object (readonly)
Returns the value of attribute value_type.
3 4 5 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 3 def value_type @value_type end |
Instance Method Details
#hidden_value? ⇒ Boolean
21 22 23 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 21 def hidden_value? @hidden end |
#options_array ⇒ Object
25 26 27 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 25 def .blank? ? [] : .split(/\r?\n/).map(&:strip) end |
#template_input ⇒ Object
17 18 19 |
# File 'app/lib/foreman_remote_execution/provider_input.rb', line 17 def template_input self end |