Class: Zona::OZonesElement

Inherits:
JSONElement show all
Defined in:
zona/OZonesElement.rb

Overview

Standard abstraction of an OZones element. To be inherited.

Direct Known Subclasses

VDC, Zone

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Methods inherited from JSONElement

#[], #initialize_json

Instance Attribute Details

- (Object) name (readonly)

Returns the value of attribute name



94
95
96
# File 'zona/OZonesElement.rb', line 94

def name
  @name
end

- (Object) pe_id (readonly)

Returns the value of attribute pe_id



94
95
96
# File 'zona/OZonesElement.rb', line 94

def pe_id
  @pe_id
end

Class Method Details

+ (OZonesElement) new_with_id(id, client = nil)

Creates a new element with the custom ID

Parameters:

  • id (#to_i)

    element ID

  • client (Zona::Client) (defaults to: nil)

    OZones Client for this element

Returns:



100
101
102
# File 'zona/OZonesElement.rb', line 100

def self.new_with_id(id, client=nil)
    self.new(self.build_json(id.to_i),client)
end