Sha256: ca41e33a3cbd3c0458b9f5ad421c811c965ca2c06cf6f23a68965a17d31a65c5

Contents?: true

Size: 692 Bytes

Versions: 8

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

module Ehbrs
  module Videos
    module Series
      module Rename
        class File
          class Options
            def initialize(docopt_runner_options)
              @options = docopt_runner_options
            end

            %w[kernel confirm recursive extension].each do |method|
              class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
      def #{method}
        @options.fetch('--#{method}')
      end
              RUBY_EVAL
            end

            def episode_increment
              r = @options.fetch('--episode-increment')
              r.present? ? r.to_i : 0
            end
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ehbrs-tools-0.15.0 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.14.1 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.14.0 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.13.1 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.13.0 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.12.0 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.11.0 lib/ehbrs/videos/series/rename/file/options.rb
ehbrs-tools-0.10.0 lib/ehbrs/videos/series/rename/file/options.rb