Class: HCloud::Client
- Inherits:
-
Object
- Object
- HCloud::Client
- Defined in:
- lib/hcloud/client.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#logger ⇒ Object
readonly
Returns the value of attribute logger.
-
#rate_limit ⇒ Object
readonly
Returns the value of attribute rate_limit.
Instance Method Summary collapse
-
#initialize(access_token:, endpoint: "https://api.hetzner.cloud/v1", logger: Logger.new("/dev/null"), rate_limit: false) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(access_token:, endpoint: "https://api.hetzner.cloud/v1", logger: Logger.new("/dev/null"), rate_limit: false) ⇒ Client
Returns a new instance of Client.
24 25 26 27 28 29 |
# File 'lib/hcloud/client.rb', line 24 def initialize(access_token:, endpoint: "https://api.hetzner.cloud/v1", logger: Logger.new("/dev/null"), rate_limit: false) @access_token = access_token @endpoint = endpoint @logger = logger @rate_limit = rate_limit end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
22 23 24 |
# File 'lib/hcloud/client.rb', line 22 def access_token @access_token end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
22 23 24 |
# File 'lib/hcloud/client.rb', line 22 def endpoint @endpoint end |
#logger ⇒ Object (readonly)
Returns the value of attribute logger.
22 23 24 |
# File 'lib/hcloud/client.rb', line 22 def logger @logger end |
#rate_limit ⇒ Object (readonly)
Returns the value of attribute rate_limit.
22 23 24 |
# File 'lib/hcloud/client.rb', line 22 def rate_limit @rate_limit end |