Class: Brightbox::Zone

Inherits:
Api
  • Object
show all
Defined in:
lib/brightbox-cli/zones.rb

Instance Attribute Summary

Attributes inherited from Api

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Api

#attributes, cache_all!, cached_get, conn, #created_on, #exists?, find, find_all_or_warn, find_by_handle, find_or_call, #fog_attributes, #fog_model, #initialize, klass_name, #method_missing, #respond_to_missing?, #to_row

Constructor Details

This class inherits a constructor from Brightbox::Api

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Brightbox::Api

Class Method Details

.allObject



5
6
7
# File 'lib/brightbox-cli/zones.rb', line 5

def self.all
  conn.zones
end

.default_field_orderObject



13
14
15
# File 'lib/brightbox-cli/zones.rb', line 13

def self.default_field_order
  %i[id handle]
end

.get(id) ⇒ Object



9
10
11
# File 'lib/brightbox-cli/zones.rb', line 9

def self.get(id)
  conn.zones.get id
end

.require_account?Boolean

Returns:

  • (Boolean)


3
# File 'lib/brightbox-cli/zones.rb', line 3

def self.require_account?; true; end

Instance Method Details

#render_cellObject



21
22
23
# File 'lib/brightbox-cli/zones.rb', line 21

def render_cell
  handle
end

#to_sObject



17
18
19
# File 'lib/brightbox-cli/zones.rb', line 17

def to_s
  id
end