Class: Kanrisuru::Core::System::Parser::LoadEnv

Inherits:
Object
  • Object
show all
Defined in:
lib/kanrisuru/core/system/parsers/load_env.rb

Class Method Summary collapse

Class Method Details

.parse(command) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/kanrisuru/core/system/parsers/load_env.rb', line 8

def self.parse(command)
  rows = command.to_a
  hash = {}

  rows.each do |row|
    key, value = row.split('=')
    hash[key] = value
  end

  hash
end