Class: KnifeUploader::KnifeConfigParser

Inherits:
Object
  • Object
show all
Defined in:
lib/chef/knife/uploader_base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(knife_conf_path) ⇒ KnifeConfigParser

Returns a new instance of KnifeConfigParser.



46
47
48
49
# File 'lib/chef/knife/uploader_base.rb', line 46

def initialize(knife_conf_path)
  @knife = {}
  instance_eval(IO.read(knife_conf_path), knife_conf_path)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object



67
68
69
# File 'lib/chef/knife/uploader_base.rb', line 67

def method_missing(meth, *args, &block)
  # skip
end

Instance Attribute Details

#knifeObject (readonly)

Returns the value of attribute knife.



44
45
46
# File 'lib/chef/knife/uploader_base.rb', line 44

def knife
  @knife
end

Instance Method Details

#cookbook_path(path_list) ⇒ Object



51
52
53
# File 'lib/chef/knife/uploader_base.rb', line 51

def cookbook_path(path_list)
  @cookbook_path_list = path_list
end

#data_bag_path(path) ⇒ Object



59
60
61
# File 'lib/chef/knife/uploader_base.rb', line 59

def data_bag_path(path)
  @data_bag_path = path
end

#get_cookbook_path_listObject



55
56
57
# File 'lib/chef/knife/uploader_base.rb', line 55

def get_cookbook_path_list
  @cookbook_path_list
end

#get_data_bag_pathObject



63
64
65
# File 'lib/chef/knife/uploader_base.rb', line 63

def get_data_bag_path
  @data_bag_path
end