Sha256: f54179a7b279a374e85341056872a8a6fd469c00d409d0f3b2d9557b995c8d1f

Contents?: true

Size: 1.28 KB

Versions: 24

Compression:

Stored size: 1.28 KB

Contents

# frozen_string_literal: true

require 'bundler'
require 'thor'
require_relative 'command_services/add_entry_service'
require_relative 'models/color_theme'
require_relative 'models/configuration'
require_relative 'models/entry_group'
require_relative 'services/stdout_redirector_service'
require_relative 'support/color_themable'
require_relative 'support/command_help_colorizeable'
require_relative 'support/command_hookable'
require_relative 'support/times_sortable'
require_relative 'version'
require_relative 'views/entry_group/show'

module Dsu
  class BaseCLI < ::Thor
    include Support::ColorThemable
    include Support::CommandHelpColorizable
    include Support::CommandHookable
    include Support::TimesSortable

    class_option :debug, type: :boolean, default: false

    default_command :help

    def initialize(*args)
      super

      @configuration = Models::Configuration.new
    end

    class << self
      def exit_on_failure?
        false
      end

      def date_option_description
        I18n.t('options.date_option_description')
      end

      def mnemonic_option_description
        I18n.t('options.mnemonic_option_description')
      end
    end

    private

    attr_reader :configuration

    def color_theme
      Models::ColorTheme.current_or_default
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dsu-3.0.5 lib/dsu/base_cli.rb
dsu-3.0.4 lib/dsu/base_cli.rb
dsu-3.0.3 lib/dsu/base_cli.rb
dsu-3.0.1 lib/dsu/base_cli.rb
dsu-3.0.0 lib/dsu/base_cli.rb
dsu-3.0.0.beta.3 lib/dsu/base_cli.rb
dsu-3.0.0.beta.2 lib/dsu/base_cli.rb
dsu-3.0.0.beta.1 lib/dsu/base_cli.rb
dsu-3.0.0.beta.0 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.12 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.11 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.10 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.9 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.8 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.7 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.6 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.5 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.4 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.3 lib/dsu/base_cli.rb
dsu-3.0.0.alpha.2 lib/dsu/base_cli.rb