Sha256: fa5540e7f401ccc4230c994a4adc6d6d2fb25191f91d474901dd9de71d873e5c

Contents?: true

Size: 392 Bytes

Versions: 4

Compression:

Stored size: 392 Bytes

Contents

require 'netbox_client_ruby/entities'
require 'netbox_client_ruby/api/dcim/device'

module NetboxClientRuby
  class Devices
    include NetboxClientRuby::Entities

    path 'dcim/devices.json'
    data_key 'results'
    count_key 'count'
    entity_creator :entity_creator

    private

    def entity_creator(raw_entity)
      NetboxClientRuby::Device.new raw_entity['id']
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
netbox-client-ruby-0.0.4 lib/netbox_client_ruby/api/dcim/devices.rb
netbox-client-ruby-0.0.3 lib/netbox_client_ruby/api/dcim/devices.rb
netbox-client-ruby-0.0.2 lib/netbox_client_ruby/api/dcim/devices.rb
netbox-client-ruby-0.0.1 lib/netbox_client_ruby/api/dcim/devices.rb