class FLACsmith::CLI::Actions::List
Handles the list action.
Attributes
tagger[R]
Public Class Methods
new(tagger: Metadata::Tagger, **dependencies)
click to toggle source
Calls superclass method
# File lib/flacsmith/cli/actions/list.rb, line 14 def initialize tagger: Metadata::Tagger, **dependencies super(**dependencies) @tagger = tagger end
Public Instance Methods
call(source_dir)
click to toggle source
# File lib/flacsmith/cli/actions/list.rb, line 19 def call source_dir Pathname(source_dir).files("**/*.flac").each do |path| logger.info { "FILE = #{path}" } tag path end end
Private Instance Methods
tag(path)
click to toggle source
# File lib/flacsmith/cli/actions/list.rb, line 30 def tag path tagger.new(path).read.map { |key, value| logger.info { "#{key} = #{value}" } } end