Class: AMEE::Object
- Inherits:
-
Object
- Object
- AMEE::Object
- Extended by:
- ParseHelper
- Includes:
- ParseHelper
- Defined in:
- lib/amee/object.rb
Direct Known Subclasses
Admin::ItemDefinition, Admin::ItemValueDefinition, 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.
Methods included from ParseHelper
Constructor Details
#initialize(data = nil) ⇒ Object
Returns a new instance of Object.
5 6 7 8 9 10 11 12 |
# File 'lib/amee/object.rb', line 5 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 = data ? data[:connection] : nil end |
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection.
14 15 16 |
# File 'lib/amee/object.rb', line 14 def connection @connection end |
#created ⇒ Object (readonly)
Returns the value of attribute created.
16 17 18 |
# File 'lib/amee/object.rb', line 16 def created @created end |
#modified ⇒ Object (readonly)
Returns the value of attribute modified.
17 18 19 |
# File 'lib/amee/object.rb', line 17 def modified @modified end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
19 20 21 |
# File 'lib/amee/object.rb', line 19 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
18 19 20 |
# File 'lib/amee/object.rb', line 18 def path @path end |
#uid ⇒ Object (readonly)
Returns the value of attribute uid.
15 16 17 |
# File 'lib/amee/object.rb', line 15 def uid @uid end |