Module: Delphix::Base
- Includes:
- Error
- Included in:
- Database, Environment, Group, Repository
- Defined in:
- lib/delphix/base.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
Returns the value of attribute details.
Instance Method Summary collapse
- #base_endpoint ⇒ Object
-
#initialize(reference = nil, details = nil) ⇒ Object
The private new method accepts a connection and a hash.
- #name ⇒ Object
- #reference ⇒ Object
- #refresh_details ⇒ Object
- #to_s ⇒ Object
- #type ⇒ Object
Instance Attribute Details
#details ⇒ Object
Returns the value of attribute details.
5 6 7 |
# File 'lib/delphix/base.rb', line 5 def details @details end |
Instance Method Details
#base_endpoint ⇒ Object
37 38 39 |
# File 'lib/delphix/base.rb', line 37 def base_endpoint # Placeholder. Subclasses need to implement this end |
#initialize(reference = nil, details = nil) ⇒ Object
The private new method accepts a connection and a hash
8 9 10 11 12 13 14 |
# File 'lib/delphix/base.rb', line 8 def initialize(reference=nil, details=nil) if details == nil @details = { 'reference' => reference } else @details = details end end |
#name ⇒ Object
20 21 22 |
# File 'lib/delphix/base.rb', line 20 def name @details['name'] || '' end |
#reference ⇒ Object
24 25 26 |
# File 'lib/delphix/base.rb', line 24 def reference @details['reference'] || '' end |
#refresh_details ⇒ Object
33 34 35 |
# File 'lib/delphix/base.rb', line 33 def refresh_details # Placeholder. Subclasses need to implement this end |
#to_s ⇒ Object
41 42 43 |
# File 'lib/delphix/base.rb', line 41 def to_s "#{self.class.name}[#{type}, #{name}, #{reference}]" end |
#type ⇒ Object
16 17 18 |
# File 'lib/delphix/base.rb', line 16 def type @details['type'] || 'unknown' end |