Class: Dapp::Builder::Chef::CookbookMetadata::Parser

Inherits:
Object
  • Object
show all
Defined in:
lib/dapp/builder/chef/cookbook_metadata.rb

Overview

Parser

Instance Method Summary collapse

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