Class: Revamp::Model::PuppetDependency
- Inherits:
-
Object
- Object
- Revamp::Model::PuppetDependency
- Defined in:
- lib/revamp/model/puppet-module.rb
Overview
This class describes a puppet dependency
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(hash) ⇒ PuppetDependency
constructor
A new instance of PuppetDependency.
Constructor Details
#initialize(hash) ⇒ PuppetDependency
Returns a new instance of PuppetDependency.
8 9 10 11 12 |
# File 'lib/revamp/model/puppet-module.rb', line 8 def initialize(hash) @name = hash['name'] versions = normalize(hash['version_requirement']) @version = Gem::Requirement.new(versions) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/revamp/model/puppet-module.rb', line 6 def name @name end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/revamp/model/puppet-module.rb', line 6 def version @version end |