Sha256: c2d6efb1610fd5f986d38151fa59038c38f7c0595bba191f9cd3cda7274315c3
Contents?: true
Size: 868 Bytes
Versions: 9
Compression:
Stored size: 868 Bytes
Contents
# frozen_string_literal: true module Mcoin module Command # :nodoc: module Saveable def self.included(base) base.class_eval do option(:single, :endpoint, '-e', '--endpoint ENDPOINT', URI, 'Database Endpoint') option(:single, :database, '-d', '--database NAME', String, 'Database Name') option(:single, :username, '-u', '--username USERNAME', String, 'Database Username') option(:single, :password, '-p', '--password PASSWORD', String, 'Database Password') end end def save? option.endpoint && option.database end def database InfluxDB.new( option.endpoint, option.database, option.username, option.password ) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems