Class: Runcible::Models::PuppetDistributor

Inherits:
Distributor
  • Object
show all
Defined in:
lib/runcible/models/puppet_distributor.rb

Instance Attribute Summary collapse

Attributes inherited from Distributor

#auto_publish, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Distributor

#type_id

Constructor Details

#initialize(absolute_path, http, https, params = {}) ⇒ PuppetDistributor

Returns a new instance of PuppetDistributor.



9
10
11
12
13
14
# File 'lib/runcible/models/puppet_distributor.rb', line 9

def initialize(absolute_path, http, https, params = {})
  @absolute_path = absolute_path
  @serve_http = http
  @serve_https = https
  super(params)
end

Instance Attribute Details

#absolute_pathObject

Returns the value of attribute absolute_path.



7
8
9
# File 'lib/runcible/models/puppet_distributor.rb', line 7

def absolute_path
  @absolute_path
end

#http_dirObject

Returns the value of attribute http_dir.



7
8
9
# File 'lib/runcible/models/puppet_distributor.rb', line 7

def http_dir
  @http_dir
end

#https_dirObject

Returns the value of attribute https_dir.



7
8
9
# File 'lib/runcible/models/puppet_distributor.rb', line 7

def https_dir
  @https_dir
end

#serve_httpObject

Returns the value of attribute serve_http.



7
8
9
# File 'lib/runcible/models/puppet_distributor.rb', line 7

def serve_http
  @serve_http
end

#serve_httpsObject

Returns the value of attribute serve_https.



7
8
9
# File 'lib/runcible/models/puppet_distributor.rb', line 7

def serve_https
  @serve_https
end

Class Method Details

.type_idObject



16
17
18
# File 'lib/runcible/models/puppet_distributor.rb', line 16

def self.type_id
  'puppet_distributor'
end

Instance Method Details

#configObject



20
21
22
23
24
25
26
# File 'lib/runcible/models/puppet_distributor.rb', line 20

def config
  to_ret = self.as_json
  to_ret.delete('absolute_path') if absolute_path.nil?
  to_ret.delete('auto_publish')
  to_ret.delete('id')
  to_ret
end