Module: Gandi::GandiObjectMethods

Included in:
Contact, Domain, Domain::Forward, Domain::Host, Domain::Mailbox, Domain::Zone, Operation
Defined in:
lib/gandi/gandi_object_methods.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



3
4
5
# File 'lib/gandi/gandi_object_methods.rb', line 3

def self.included(base)
  base.extend Gandi::Connector
end

Instance Method Details

#[](attribute) ⇒ Object

Returns an attribute value.



19
20
21
# File 'lib/gandi/gandi_object_methods.rb', line 19

def [](attribute)
  @attributes[attribute.to_s]
end

#inspectObject

Returns a string containing a human-readable representation of the object. TODO improve the output.



14
15
16
# File 'lib/gandi/gandi_object_methods.rb', line 14

def inspect
  @attributes.inspect
end

#to_hashObject

Returns a hash (with string keys) with the object information attributes.



8
9
10
# File 'lib/gandi/gandi_object_methods.rb', line 8

def to_hash
  @attributes.dup
end