Class: AMEE::Object
- Inherits:
-
Object
- Object
- AMEE::Object
- Defined in:
- lib/amee/object.rb
Direct Known Subclasses
Admin::ItemDefinition, Admin::User, Data::Object, Profile::Object
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#created ⇒ Object
readonly
Returns the value of attribute created.
-
#modified ⇒ Object
readonly
Returns the value of attribute modified.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#uid ⇒ Object
readonly
Returns the value of attribute uid.
Instance Method Summary collapse
-
#initialize(data = nil) ⇒ Object
constructor
A new instance of Object.
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
#connection ⇒ Object
Returns the value of attribute connection.
13 14 15 |
# File 'lib/amee/object.rb', line 13 def connection @connection end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
15 16 17 |
# File 'lib/amee/object.rb', line 15 def created @created end |
#modified ⇒ Object (readonly)
Returns the value of attribute modified.
16 17 18 |
# File 'lib/amee/object.rb', line 16 def modified @modified end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/amee/object.rb', line 18 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
17 18 19 |
# File 'lib/amee/object.rb', line 17 def path @path end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
14 15 16 |
# File 'lib/amee/object.rb', line 14 def uid @uid end |