Sha256: dede491c68c213f462743b6b91efaaaf287bdd04daed963fc189824609616f24

Contents?: true

Size: 1.31 KB

Versions: 25

Compression:

Stored size: 1.31 KB

Contents

require 'netbox_client_ruby/api/virtualization/cluster_group'
require 'netbox_client_ruby/api/virtualization/cluster_groups'
require 'netbox_client_ruby/api/virtualization/cluster_type'
require 'netbox_client_ruby/api/virtualization/cluster_types'
require 'netbox_client_ruby/api/virtualization/cluster'
require 'netbox_client_ruby/api/virtualization/clusters'
require 'netbox_client_ruby/api/virtualization/interface'
require 'netbox_client_ruby/api/virtualization/interfaces'
require 'netbox_client_ruby/api/virtualization/virtual_machine'
require 'netbox_client_ruby/api/virtualization/virtual_machines'
require 'netbox_client_ruby/communication'

module NetboxClientRuby
  module Virtualization
    {
      cluster_groups: ClusterGroups,
      cluster_types: ClusterTypes,
      clusters: Clusters,
      virtual_machines: VirtualMachines,
      interfaces: Interfaces,
    }.each_pair do |method_name, class_name|
      define_method(method_name) { class_name.new }
      module_function(method_name)
    end

    {
      cluster_group: ClusterGroup,
      cluster_type: ClusterType,
      cluster: Cluster,
      virtual_machine: VirtualMachine,
      interface: Interface,
    }.each_pair do |method_name, class_name|
      define_method(method_name) { |id| class_name.new id }
      module_function(method_name)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
netbox-client-ruby-0.10.1 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.10.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.9.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.8.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.7.1 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.7.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.6.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.7 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.6 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.5 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.4 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.3 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.2 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.1 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.5.0 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.4.10 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.4.9 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.4.7 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.4.6 lib/netbox_client_ruby/api/virtualization.rb
netbox-client-ruby-0.4.3 lib/netbox_client_ruby/api/virtualization.rb