Class: Dapp::Builder::Chef::Berksfile::Parser

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

Overview

Parser

Instance Method Summary collapse

Constructor Details

#initialize(berksfile) ⇒ Parser

Returns a new instance of Parser.



8
9
10
11
# File 'lib/dapp/builder/chef/berksfile.rb', line 8

def initialize(berksfile)
  @berksfile = berksfile
  parse
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*_a, &_blk) ⇒ Object

rubocop:disable Style/MethodMissing



18
19
# File 'lib/dapp/builder/chef/berksfile.rb', line 18

def method_missing(*_a, &_blk)
end

Instance Method Details

#cookbook(name, path: nil, **_kwargs) ⇒ Object



13
14
15
# File 'lib/dapp/builder/chef/berksfile.rb', line 13

def cookbook(name, path: nil, **_kwargs)
  @berksfile.add_local_cookbook_path(name, path) if path
end