Class: PuppetModule::Pkg::Tasks::Modulefile

Inherits:
Object
  • Object
show all
Defined in:
lib/puppet_module/pkg/tasks/modulefile.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ Modulefile

Returns a new instance of Modulefile.



13
14
15
16
17
# File 'lib/puppet_module/pkg/tasks/modulefile.rb', line 13

def initialize(str)
   = OpenStruct.new
  binding.eval str
  validate_required_fields
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args) ⇒ Object



19
20
21
22
23
# File 'lib/puppet_module/pkg/tasks/modulefile.rb', line 19

def method_missing(*args)
  # TODO: Maybe display an info message about the
  # unrecognized/unsupported field? (it might be a typo, so the user
  # might be happy to know what have been ignored)
end

Instance Attribute Details

#metadataObject (readonly)

Returns the value of attribute metadata.



11
12
13
# File 'lib/puppet_module/pkg/tasks/modulefile.rb', line 11

def 
  
end

Class Method Details

.parse(file) ⇒ Object



7
8
9
# File 'lib/puppet_module/pkg/tasks/modulefile.rb', line 7

def self.parse(file)
  self.new(File.read(file)).
end