Class: Curate::ContentVersion
- Inherits:
-
Object
- Object
- Curate::ContentVersion
- Defined in:
- app/models/curate/content_version.rb
Defined Under Namespace
Classes: Null
Instance Attribute Summary collapse
-
#committer_name ⇒ Object
readonly
Returns the value of attribute committer_name.
-
#created_on ⇒ Object
readonly
Returns the value of attribute created_on.
-
#version_id ⇒ Object
readonly
Returns the value of attribute version_id.
Instance Method Summary collapse
- #formatted_created_on(format = :long_ordinal) ⇒ Object
-
#initialize(content, version_structure) ⇒ ContentVersion
constructor
A new instance of ContentVersion.
Constructor Details
#initialize(content, version_structure) ⇒ ContentVersion
Returns a new instance of ContentVersion.
13 14 15 16 17 |
# File 'app/models/curate/content_version.rb', line 13 def initialize(content, version_structure) @created_on = version_structure.dsCreateDate @version_id = version_structure.versionID @committer_name = content.version_committer(version_structure) end |
Instance Attribute Details
#committer_name ⇒ Object (readonly)
Returns the value of attribute committer_name.
12 13 14 |
# File 'app/models/curate/content_version.rb', line 12 def committer_name @committer_name end |
#created_on ⇒ Object (readonly)
Returns the value of attribute created_on.
12 13 14 |
# File 'app/models/curate/content_version.rb', line 12 def created_on @created_on end |
#version_id ⇒ Object (readonly)
Returns the value of attribute version_id.
12 13 14 |
# File 'app/models/curate/content_version.rb', line 12 def version_id @version_id end |
Instance Method Details
#formatted_created_on(format = :long_ordinal) ⇒ Object
19 20 21 |
# File 'app/models/curate/content_version.rb', line 19 def formatted_created_on(format = :long_ordinal ) created_on.localtime.to_formatted_s(format) end |