Class: Travis::Config::Serialize::Env

Inherits:
Struct
  • Object
show all
Defined in:
lib/travis/config/serialize/env.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config, opts = {}) ⇒ Env

Returns a new instance of Env.



7
8
9
10
# File 'lib/travis/config/serialize/env.rb', line 7

def initialize(config, opts = {})
  @config = config
  @opts = opts
end

Instance Attribute Details

#configObject

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



4
5
6
# File 'lib/travis/config/serialize/env.rb', line 4

def config
  @config
end

#optsObject

Returns the value of attribute opts

Returns:

  • (Object)

    the current value of opts



4
5
6
# File 'lib/travis/config/serialize/env.rb', line 4

def opts
  @opts
end

Instance Method Details

#applyObject



12
13
14
# File 'lib/travis/config/serialize/env.rb', line 12

def apply
  vars.to_a.map { |pair| pair.join('=') }
end