Class: Ridoku::ClassProperties

Inherits:
Object
  • Object
show all
Defined in:
lib/ridoku/defaults.rb

Direct Known Subclasses

RailsDefaults

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeClassProperties

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

#defaultObject

Returns the value of attribute default.



17
18
19
# File 'lib/ridoku/defaults.rb', line 17

def default
  @default
end

#inputObject

Returns the value of attribute input.



17
18
19
# File 'lib/ridoku/defaults.rb', line 17

def input
  @input
end

#requiredObject

Returns the value of attribute required.



17
18
19
# File 'lib/ridoku/defaults.rb', line 17

def required
  @required
end

#warningsObject

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