Class: Evm::Command::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/evm/command/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv, options = {}) ⇒ Config

Returns a new instance of Config.



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/evm/command/config.rb', line 4

def initialize(argv, options = {})
  type, value = argv

  unless Evm::CONFIG_TYPES.include?(type.to_sym)
    raise Evm::Exception, "Invalid config type: #{type}"
  end

  if value
    Evm.config[type] = value
  end

  STDOUT.puts(Evm.config[type])
end