Class: Curate::ContentVersion

Inherits:
Object
  • Object
show all
Defined in:
app/models/curate/content_version.rb

Defined Under Namespace

Classes: Null

Instance Attribute Summary collapse

Instance Method Summary collapse

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_nameObject (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_onObject (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_idObject (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