Class: ObjectMeta
- Inherits:
-
Object
- Object
- ObjectMeta
- Defined in:
- lib/base/v1/core/ObjectMeta.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#resourceversion ⇒ Object
Returns the value of attribute resourceversion.
-
#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.
32 33 34 35 36 37 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 32 def initialize @name = nil @namespace = nil @selflink = nil @resourceversion = nil end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
27 28 29 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 27 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
28 29 30 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 28 def namespace @namespace end |
#resourceversion ⇒ Object
Returns the value of attribute resourceversion.
30 31 32 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 30 def resourceversion @resourceversion end |
#selflink ⇒ Object
Returns the value of attribute selflink.
29 30 31 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 29 def selflink @selflink end |
Instance Method Details
#get_hash ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 39 def get_hash = Hash.new unless @name.nil? [:name] = @name end unless @namespace.nil? [:namespace] = @namespace end unless @selflink.nil? [:selflink] = @selflink end unless @resourceversion.nil? [:resourceVersion] = @resourceversion.to_s end return end |
#get_json ⇒ Object
60 61 62 |
# File 'lib/base/v1/core/ObjectMeta.rb', line 60 def get_json return JSON.generate(get_hash) end |