Class: Awsome::Requirements
- Inherits:
-
Object
- Object
- Awsome::Requirements
- Defined in:
- lib/awsome/requirements.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(requirements_hash) ⇒ Requirements
constructor
A new instance of Requirements.
- #instances ⇒ Object
Constructor Details
#initialize(requirements_hash) ⇒ Requirements
Returns a new instance of Requirements.
6 7 8 9 |
# File 'lib/awsome/requirements.rb', line 6 def initialize(requirements_hash) @requirements = requirements_hash.clone @options = Awsome::RequirementsOptions.new(@requirements) end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/awsome/requirements.rb', line 5 def @options end |
Class Method Details
.from_yaml_file(filename) ⇒ Object
10 11 12 |
# File 'lib/awsome/requirements.rb', line 10 def self.from_yaml_file(filename) new(YAML::load(File.open(filename, 'r').read)) end |
Instance Method Details
#instances ⇒ Object
13 14 15 16 17 |
# File 'lib/awsome/requirements.rb', line 13 def instances @requirements['instances'].collect do |instance_req| Awsome::InstanceRequirement.new(instance_req, @options) end end |