Sha256: bcf731c20458378ff606bbcb28b6b61755bb79118f49990ca8ff42e1373ba249

Contents?: true

Size: 590 Bytes

Versions: 27

Compression:

Stored size: 590 Bytes

Contents

# frozen_string_literal: true

require 'eac_cli/core_ext'
require 'ehbrs/tools/instance'

module Ehbrs
  module Tools
    class Runner
      class Telegram
        require_sub __FILE__

        runner_with :help, :subcommands do
          desc 'Operações com Telegram.'
          arg_opt '-b', '--bot-token', 'Token do bot Telegram.'
          subcommands
        end

        def bot_token
          parsed.bot_token || default_bot_token
        end

        def default_bot_token
          ::Ehbrs::Tools.instance.read_entry(:telegram_bot_token)
        end
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
ehbrs-tools-0.43.1 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.43.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.42.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.39.1 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.39.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.38.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.37.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.36.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.35.1 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.35.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.34.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.33.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.32.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.31.1 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.31.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.30.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.29.0 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.28.3 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.28.2 lib/ehbrs/tools/runner/telegram.rb
ehbrs-tools-0.28.1 lib/ehbrs/tools/runner/telegram.rb