Class: HCloud::Metadata
- Defined in:
- lib/hcloud/resources/metadata.rb
Overview
Constant Summary collapse
- ENDPOINT =
"https://169.254.169.254/hetzner/v1/metadata"
Class Method Summary collapse
Methods inherited from Resource
#==, attribute, client, #initialize, #inspect, resource_name, #to_h
Constructor Details
This class inherits a constructor from HCloud::Resource
Class Method Details
.find ⇒ Object
26 27 28 29 30 31 |
# File 'lib/hcloud/resources/metadata.rb', line 26 def self.find new(::HTTP .get(ENDPOINT) .parse(:yaml) .deep_transform_keys { |key| key.underscore.to_sym }) end |