Class: ObjectMeta
- Inherits:
-
Object
- Object
- ObjectMeta
- Defined in:
- lib/base/v1/ocpapi/ObjectMeta.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#selflink ⇒ Object
Returns the value of attribute selflink.
Instance Method Summary collapse
- #get_hash ⇒ Object
- #get_json ⇒ Object
-
#initialize ⇒ ObjectMeta
constructor
A new instance of ObjectMeta.
Constructor Details
#initialize ⇒ ObjectMeta
Returns a new instance of ObjectMeta.
31 32 33 34 35 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 31 def initialize @name = nil @namespace = nil @selflink = nil end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
27 28 29 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 27 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
28 29 30 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 28 def namespace @namespace end |
#selflink ⇒ Object
Returns the value of attribute selflink.
29 30 31 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 29 def selflink @selflink end |
Instance Method Details
#get_hash ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 37 def get_hash = Hash.new unless @name.nil? [:name] = @name end unless @namespace.nil? [:namespace] = @namespace end unless @selflink.nil? [:selflink] = @selflink end [:resourceVersion] = "1001" return end |
#get_json ⇒ Object
56 57 58 |
# File 'lib/base/v1/ocpapi/ObjectMeta.rb', line 56 def get_json return JSON.generate(get_hash) end |