Class: Cloudflair::Railgun
- Inherits:
-
Object
- Object
- Cloudflair::Railgun
- Includes:
- Entity
- Defined in:
- lib/cloudflair/api/zone/railgun.rb
Instance Attribute Summary collapse
-
#railgun_id ⇒ Object
readonly
Returns the value of attribute railgun_id.
-
#zone_id ⇒ Object
readonly
Returns the value of attribute zone_id.
Instance Method Summary collapse
- #diagnose ⇒ Object
-
#initialize(zone_id, railgun_id) ⇒ Railgun
constructor
A new instance of Railgun.
Methods included from Entity
#data=, #delete, included, #method_missing, #patch, #reload, #respond_to_missing?, #revert, #update
Methods included from Communication
#connection, #hash_to_object, #response
Constructor Details
#initialize(zone_id, railgun_id) ⇒ Railgun
Returns a new instance of Railgun.
13 14 15 16 |
# File 'lib/cloudflair/api/zone/railgun.rb', line 13 def initialize(zone_id, railgun_id) @zone_id = zone_id @railgun_id = railgun_id end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cloudflair::Entity
Instance Attribute Details
#railgun_id ⇒ Object (readonly)
Returns the value of attribute railgun_id.
9 10 11 |
# File 'lib/cloudflair/api/zone/railgun.rb', line 9 def railgun_id @railgun_id end |
#zone_id ⇒ Object (readonly)
Returns the value of attribute zone_id.
9 10 11 |
# File 'lib/cloudflair/api/zone/railgun.rb', line 9 def zone_id @zone_id end |
Instance Method Details
#diagnose ⇒ Object
18 19 20 21 22 |
# File 'lib/cloudflair/api/zone/railgun.rb', line 18 def diagnose raw_response = connection.get "#{path}/diagnose" parsed_response = response raw_response hash_to_object parsed_response end |