Class: AMEE::Object

Inherits:
Object
  • Object
show all
Defined in:
lib/amee/object.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = nil) ⇒ Object

Returns a new instance of Object.



4
5
6
7
8
9
10
11
# File 'lib/amee/object.rb', line 4

def initialize(data = nil)
  @uid = data ? data[:uid] : nil
  @created = data ? data[:created] : Time.now
  @modified = data ? data[:modified] : @created
  @path = data ? data[:path] : nil
  @name = data ? data[:name] : nil
  @connection = nil
end

Instance Attribute Details

#connectionObject

Returns the value of attribute connection.



13
14
15
# File 'lib/amee/object.rb', line 13

def connection
  @connection
end

#createdObject (readonly)

Returns the value of attribute created.



15
16
17
# File 'lib/amee/object.rb', line 15

def created
  @created
end

#modifiedObject (readonly)

Returns the value of attribute modified.



16
17
18
# File 'lib/amee/object.rb', line 16

def modified
  @modified
end

#nameObject (readonly)

Returns the value of attribute name.



18
19
20
# File 'lib/amee/object.rb', line 18

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



17
18
19
# File 'lib/amee/object.rb', line 17

def path
  @path
end

#uidObject (readonly)

Returns the value of attribute uid.



14
15
16
# File 'lib/amee/object.rb', line 14

def uid
  @uid
end