Module: HCloud

Defined in:
lib/hcloud/resource_type.rb,
lib/hcloud.rb,
lib/hcloud/http.rb,
lib/hcloud/client.rb,
lib/hcloud/entity.rb,
lib/hcloud/errors.rb,
lib/hcloud/version.rb,
lib/hcloud/resource.rb,
lib/hcloud/collection.rb,
lib/hcloud/entities/ipv4.rb,
lib/hcloud/entities/ipv6.rb,
lib/hcloud/entities/rule.rb,
lib/hcloud/resources/iso.rb,
lib/hcloud/entities/error.rb,
lib/hcloud/entities/price.rb,
lib/hcloud/entities/route.rb,
lib/hcloud/entities/amount.rb,
lib/hcloud/entities/subnet.rb,
lib/hcloud/entities/target.rb,
lib/hcloud/resources/image.rb,
lib/hcloud/entities/metrics.rb,
lib/hcloud/entities/service.rb,
lib/hcloud/entities/targets.rb,
lib/hcloud/entities/used_by.rb,
lib/hcloud/resources/action.rb,
lib/hcloud/resources/server.rb,
lib/hcloud/resources/volume.rb,
lib/hcloud/action_collection.rb,
lib/hcloud/concerns/concerns.rb,
lib/hcloud/entities/apply_to.rb,
lib/hcloud/resources/network.rb,
lib/hcloud/resources/pricing.rb,
lib/hcloud/resources/ssh_key.rb,
lib/hcloud/concerns/creatable.rb,
lib/hcloud/concerns/deletable.rb,
lib/hcloud/concerns/labelable.rb,
lib/hcloud/concerns/meterable.rb,
lib/hcloud/concerns/queryable.rb,
lib/hcloud/concerns/singleton.rb,
lib/hcloud/concerns/updatable.rb,
lib/hcloud/entities/algorithm.rb,
lib/hcloud/entities/target_ip.rb,
lib/hcloud/resources/firewall.rb,
lib/hcloud/resources/location.rb,
lib/hcloud/resources/metadata.rb,
lib/hcloud/concerns/actionable.rb,
lib/hcloud/entities/applied_to.rb,
lib/hcloud/entities/protection.rb,
lib/hcloud/entities/public_net.rb,
lib/hcloud/entities/deprecation.rb,
lib/hcloud/entities/dns_pointer.rb,
lib/hcloud/entities/image_price.rb,
lib/hcloud/entities/private_net.rb,
lib/hcloud/resources/datacenter.rb,
lib/hcloud/resources/primary_ip.rb,
lib/hcloud/entities/health_check.rb,
lib/hcloud/entities/service_http.rb,
lib/hcloud/entities/volume_price.rb,
lib/hcloud/resources/certificate.rb,
lib/hcloud/resources/floating_ip.rb,
lib/hcloud/resources/server_type.rb,
lib/hcloud/entities/health_status.rb,
lib/hcloud/entities/target_target.rb,
lib/hcloud/entities/traffic_price.rb,
lib/hcloud/entities/label_selector.rb,
lib/hcloud/resources/load_balancer.rb,
lib/hcloud/entities/private_network.rb,
lib/hcloud/resources/placement_group.rb,
lib/hcloud/entities/floating_ip_price.rb,
lib/hcloud/entities/health_check_http.rb,
lib/hcloud/entities/primary_ip_prices.rb,
lib/hcloud/entities/server_protection.rb,
lib/hcloud/entities/server_type_price.rb,
lib/hcloud/concerns/dynamic_attributes.rb,
lib/hcloud/entities/certificate_status.rb,
lib/hcloud/entities/floating_ip_prices.rb,
lib/hcloud/entities/applied_to_resource.rb,
lib/hcloud/entities/public_net_firewall.rb,
lib/hcloud/entities/server_backup_price.rb,
lib/hcloud/resources/load_balancer_type.rb,
lib/hcloud/entities/datacenter_server_type.rb,
lib/hcloud/entities/load_balancer_public_net.rb,
lib/hcloud/entities/load_balancer_type_price.rb,
lib/hcloud/entities/load_balancer_private_net.rb

Overview

rubocop:disable Metrics/CyclomaticComplexity

Defined Under Namespace

Modules: Errors Classes: Action, Algorithm, Amount, AppliedTo, AppliedToResource, ApplyTo, Certificate, CertificateStatus, DNSPointer, Datacenter, DatacenterServerType, Deprecation, Error, Firewall, FloatingIP, FloatingIPPrice, FloatingIPPrices, HealthCheck, HealthCheckHTTP, HealthStatus, IPv4, IPv6, ISO, Image, ImagePrice, LabelSelector, LoadBalancer, LoadBalancerPrivateNet, LoadBalancerPublicNet, LoadBalancerType, LoadBalancerTypePrice, Location, Metadata, Metrics, Network, PlacementGroup, Price, Pricing, PrimaryIP, PrimaryIPPrices, PrivateNet, PrivateNetwork, Protection, PublicNet, PublicNetFirewall, Resource, Route, Rule, SSHKey, Server, ServerBackupPrice, ServerProtection, ServerType, ServerTypePrice, Service, ServiceHTTP, Subnet, Target, TargetIP, TargetTarget, Targets, TrafficPrice, UsedBy, Volume, VolumePrice

Constant Summary collapse

NAME =
"hetznercloud"
VERSION =
Version::STRING

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.loaderObject (readonly)

Code loader instance



10
11
12
# File 'lib/hcloud.rb', line 10

def loader
  @loader
end

Class Method Details

.rootObject



12
13
14
# File 'lib/hcloud.rb', line 12

def root
  @root ||= Pathname.new(File.expand_path(File.join("..", ".."), __FILE__))
end

.setupObject



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/hcloud.rb', line 16

def setup
  @loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false)

  # Register inflections
  require root.join("config/inflections.rb")

  # Collapse resources
  loader.collapse(
    root.join("lib/hcloud/entities"),
    root.join("lib/hcloud/concerns"),
    root.join("lib/hcloud/resources"),
  )

  # Load types
  require root.join("lib/hcloud/resource_type")

  loader.setup
  loader.eager_load
end