Class: ObjectReference
- Inherits:
-
Object
- Object
- ObjectReference
- Defined in:
- lib/base/v1/ocpapi/ObjectReference.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
Returns the value of attribute kind.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
- #get_hash ⇒ Object
- #get_json ⇒ Object
-
#initialize ⇒ ObjectReference
constructor
A new instance of ObjectReference.
Constructor Details
#initialize ⇒ ObjectReference
Returns a new instance of ObjectReference.
29 30 31 32 |
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 29 def initialize @name = nil @kind = nil end |
Instance Attribute Details
#kind ⇒ Object
Returns the value of attribute kind.
27 28 29 |
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 27 def kind @kind end |
#name ⇒ Object
Returns the value of attribute name.
26 27 28 |
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 26 def name @name end |
Instance Method Details
#get_hash ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 34 def get_hash = Hash.new unless @name.nil? [:name] = @name end unless @kind.nil? [:kind] = @kind end return end |
#get_json ⇒ Object
47 48 49 |
# File 'lib/base/v1/ocpapi/ObjectReference.rb', line 47 def get_json return JSON.generate(get_hash) end |