Class: Chef::Knife::S3Source

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#config ⇒ Object

Returns the value of attribute config.



20
21
22
# File 'lib/chef/knife/helpers/s3_source.rb', line 20

def config
  @config
end

#url ⇒ Object

Returns the value of attribute url.



20
21
22
# File 'lib/chef/knife/helpers/s3_source.rb', line 20

def url
  @url
end

Class Method Details

.fetch(url, config) ⇒ Object



22
23
24
25
26
27
# File 'lib/chef/knife/helpers/s3_source.rb', line 22

def self.fetch(url, config)
  source = Chef::Knife::S3Source.new
  source.url = url
  source.config = config
  source.body
end

Instance Method Details

#body ⇒ Object



29
30
31
# File 'lib/chef/knife/helpers/s3_source.rb', line 29

def body
  bucket_obj.body.string
end