Class: Revamp::Model::PuppetDependency

Inherits:
Object
  • Object
show all
Defined in:
lib/revamp/model/puppet-module.rb

Overview

This class describes a puppet dependency

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/revamp/model/puppet-module.rb', line 6

def name
  @name
end

#versionObject

Returns the value of attribute version.



6
7
8
# File 'lib/revamp/model/puppet-module.rb', line 6

def version
  @version
end