Class: DataMapper::Adapters::PuppetdbAdapter

Inherits:
AbstractAdapter
  • Object
show all
Defined in:
lib/dm-puppetdb-adapter/adapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#hostObject

Returns the value of attribute host.



11
12
13
# File 'lib/dm-puppetdb-adapter/adapter.rb', line 11

def host
  @host
end

#httpObject

Returns the value of attribute http.



11
12
13
# File 'lib/dm-puppetdb-adapter/adapter.rb', line 11

def http
  @http
end

#portObject

Returns the value of attribute port.



11
12
13
# File 'lib/dm-puppetdb-adapter/adapter.rb', line 11

def port
  @port
end

#sslObject

Returns the value of attribute ssl.



11
12
13
# File 'lib/dm-puppetdb-adapter/adapter.rb', line 11

def ssl
  @ssl
end

Instance Method Details

#read(query) ⇒ Object



13
14
15
16
17
# File 'lib/dm-puppetdb-adapter/adapter.rb', line 13

def read(query)
  model = query.model

  query.filter_records(puppetdb_get(model.storage_name(model.repository_name), build_query(query)))
end