Class: HostradoAPI::V1::Domains

Inherits:
Object
  • Object
show all
Defined in:
lib/v1/domains.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Domains

Returns a new instance of Domains.



4
5
6
# File 'lib/v1/domains.rb', line 4

def initialize(connection)
  @connection = connection
end

Instance Method Details

#listObject



8
9
10
11
# File 'lib/v1/domains.rb', line 8

def list
  domain_list, _ = @connection.send_request(:get, '/domains')
  domain_list['domains'].map { |domain| HostradoAPI::Domain.new(domain) }
end