Sha256: 43c78d173633060fc78e0951b7b355615115a86e418a1228d75cb09ce8fc592c

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

module Hearken
  module Tagged
    FILE_FIELDS = %w[path timestamp].freeze
    TAG_FIELDS = %w[album track title artist time date albumartist puid mbartistid mbalbumid mbalbumartistid asin].freeze
    FIELDS = FILE_FIELDS + TAG_FIELDS

    attr_accessor(*FIELDS.map(&:to_sym))

    def no_tag_fields?
      TAG_FIELDS.select { |field| send field }.empty?
    end

    def to_a
      FIELDS.map { |field| send field }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hearken-0.1.3 lib/hearken/tagged.rb