Sha256: f309427507b73638f6ebeb08d1c8812479c803f098251e5889aa895c5d29a93b
Contents?: true
Size: 478 Bytes
Versions: 10
Compression:
Stored size: 478 Bytes
Contents
# frozen_string_literal: true module UltimateLyrics class SongMetadata class Field enable_listable lists.add_symbol :sources, :album, :artist, :title, :track, :year common_constructor :song_metadata, :field def apply(string) field.apply(string, value) end def value field.value(song_metadata.send(field.source_attribute)) end def to_s "[#{song_metadata} | #{field}]" end end end end
Version data entries
10 entries across 10 versions & 2 rubygems