Class: CFC::Zone
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ Zone
constructor
A new instance of Zone.
- #purge_all_files ⇒ Object
- #records ⇒ Object
Methods inherited from APIObject
#inspect, #method_missing, relationships, #respond_to_missing?
Constructor Details
#initialize(data) ⇒ Zone
Returns a new instance of Zone.
18 19 20 |
# File 'lib/cfc/objects/zone.rb', line 18 def initialize(data) super(data) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CFC::APIObject
Class Method Details
.list ⇒ Object
13 14 15 16 |
# File 'lib/cfc/objects/zone.rb', line 13 def self.list data = @api.get_json('zones')['result'] data.map { |z| new(z) } end |
Instance Method Details
#purge_all_files ⇒ Object
22 23 24 |
# File 'lib/cfc/objects/zone.rb', line 22 def purge_all_files @api.post_to_json("zones/#{id}/purge_cache", { purge_everything: true }) end |