Sha256: e4a7db660447cca8a7bb7559468be0fc8015ce60a2e455b3bd1053be0cbbef5d

Contents?: true

Size: 677 Bytes

Versions: 9

Compression:

Stored size: 677 Bytes

Contents

module Worthwhile
  class ContentVersion
    class Null
      def initialize(content)
      end
      def created_on; 'unknown'; end
      def committer_name; 'unknown'; end
      def formatted_created_on(*args); 'unknown'; end
      def version_id; 'unknown'; end
    end

    attr_reader :version_id, :created_on, :committer_name
    def initialize(content, version_structure)
      @created_on = version_structure.dsCreateDate
      @version_id = version_structure.versionID
      @committer_name = content.version_committer(version_structure)
    end

    def formatted_created_on(format = :long_ordinal )
      created_on.localtime.to_formatted_s(format)
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
worthwhile-0.1.2 worthwhile-models/app/models/worthwhile/content_version.rb
worthwhile-models-0.1.2 app/models/worthwhile/content_version.rb
worthwhile-0.1.1 worthwhile-models/app/models/worthwhile/content_version.rb
worthwhile-models-0.1.1 app/models/worthwhile/content_version.rb
worthwhile-0.1.0 worthwhile-models/app/models/worthwhile/content_version.rb
worthwhile-models-0.1.0 app/models/worthwhile/content_version.rb
worthwhile-0.0.3 app/models/worthwhile/content_version.rb
worthwhile-0.0.2 app/models/worthwhile/content_version.rb
worthwhile-0.0.1 app/models/worthwhile/content_version.rb