Sha256: 8733b70a71f13f3cb5882cef8ad55100221be92f3380bc6685feb3d1a264ff04

Contents?: true

Size: 915 Bytes

Versions: 1

Compression:

Stored size: 915 Bytes

Contents

# frozen_string_literal: true

require 'thor'
require 'etht/bigquery'
require 'etht/etherscan'
require 'etht/version'

# @author Hernani Rodrigues Vaz
module Etht
  ID = `whoami`.chomp

  class Error < StandardError; end
  # class Exception < StandardError
  class Exception < StandardError
    def initialize(message)
      super(message)
    end
  end

  # CLI para carregar etherscan comuns no bigquery
  class CLI < Thor
    desc 'work', 'carrega/apaga dados do etherscan'
    option :e, type: :boolean, default: false, desc: 'apaga linha igual'
    option :m, type: :boolean, default: false, desc: 'apaga linhas existencia multipla'
    # processa etherscan
    def work
      Bigquery.new({ e: options[:e], m: options[:m], i: true }).processa_eth
    end

    desc 'show', 'mostra dados do etherscan'
    # show etherscan
    def show
      Bigquery.new.processa_eth
    end

    default_task :show
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
etht-0.1.4 lib/etht.rb