Class: Dapp::Builder::Chef::CookbookMetadata::Parser
- Inherits:
-
Object
- Object
- Dapp::Builder::Chef::CookbookMetadata::Parser
- Defined in:
- lib/dapp/builder/chef/cookbook_metadata.rb
Overview
Parser
Instance Method Summary collapse
- #depends(dependency, *_a, &_blk) ⇒ Object
-
#initialize(cookbook_metadata) ⇒ Parser
constructor
A new instance of Parser.
-
#method_missing(*_a, &_blk) ⇒ Object
rubocop:disable Style/MethodMissing.
- #name(name) ⇒ Object
- #version(version) ⇒ Object
Constructor Details
#initialize(cookbook_metadata) ⇒ Parser
Returns a new instance of Parser.
8 9 10 11 |
# File 'lib/dapp/builder/chef/cookbook_metadata.rb', line 8 def initialize() @cookbook_metadata = parse end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*_a, &_blk) ⇒ Object
rubocop:disable Style/MethodMissing
26 27 |
# File 'lib/dapp/builder/chef/cookbook_metadata.rb', line 26 def method_missing(*_a, &_blk) end |
Instance Method Details
#depends(dependency, *_a, &_blk) ⇒ Object
21 22 23 |
# File 'lib/dapp/builder/chef/cookbook_metadata.rb', line 21 def depends(dependency, *_a, &_blk) @cookbook_metadata.depends << dependency.to_s end |
#name(name) ⇒ Object
13 14 15 |
# File 'lib/dapp/builder/chef/cookbook_metadata.rb', line 13 def name(name) @cookbook_metadata.name = name end |
#version(version) ⇒ Object
17 18 19 |
# File 'lib/dapp/builder/chef/cookbook_metadata.rb', line 17 def version(version) @cookbook_metadata.version = version end |