Class: Ridoku::ClassProperties
- Inherits:
-
Object
- Object
- Ridoku::ClassProperties
- Defined in:
- lib/ridoku/defaults.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#default ⇒ Object
Returns the value of attribute default.
-
#input ⇒ Object
Returns the value of attribute input.
-
#required ⇒ Object
Returns the value of attribute required.
-
#warnings ⇒ Object
Returns the value of attribute warnings.
Instance Method Summary collapse
- #defaults(type, _input, wizard = false) ⇒ Object
- #defaults_with_wizard(type, _input) ⇒ Object
-
#initialize ⇒ ClassProperties
constructor
A new instance of ClassProperties.
Constructor Details
#initialize ⇒ ClassProperties
Returns a new instance of ClassProperties.
19 20 21 22 |
# File 'lib/ridoku/defaults.rb', line 19 def initialize fail StandardError.new('IAM/OpsWorks permission are not yet configured.') unless Base.roles_configured? end |
Instance Attribute Details
#default ⇒ Object
Returns the value of attribute default.
17 18 19 |
# File 'lib/ridoku/defaults.rb', line 17 def default @default end |
#input ⇒ Object
Returns the value of attribute input.
17 18 19 |
# File 'lib/ridoku/defaults.rb', line 17 def input @input end |
#required ⇒ Object
Returns the value of attribute required.
17 18 19 |
# File 'lib/ridoku/defaults.rb', line 17 def required @required end |
#warnings ⇒ Object
Returns the value of attribute warnings.
17 18 19 |
# File 'lib/ridoku/defaults.rb', line 17 def warnings @warnings end |
Instance Method Details
#defaults(type, _input, wizard = false) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/ridoku/defaults.rb', line 28 def defaults(type, _input, wizard = false) self.input = _input fail ArgumentError.new("No default parameters for type: #{type}") unless default.key?(type) merge_input(type, wizard) end |
#defaults_with_wizard(type, _input) ⇒ Object
24 25 26 |
# File 'lib/ridoku/defaults.rb', line 24 def defaults_with_wizard(type, _input) defaults(type, _input, true) end |