Class: Stack::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/stack/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash = nil) ⇒ Configuration

Returns a new instance of Configuration.



5
6
7
# File 'lib/stack/configuration.rb', line 5

def initialize(hash = nil)
  self.from_hash(hash)
end

Instance Attribute Details

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/stack/configuration.rb', line 3

def source
  @source
end

#targetObject

Returns the value of attribute target.



3
4
5
# File 'lib/stack/configuration.rb', line 3

def target
  @target
end

Instance Method Details

#from_hash(hash) ⇒ Object



9
10
11
12
13
14
# File 'lib/stack/configuration.rb', line 9

def from_hash(hash)
  if (hash != nil)
    @source = hash[:source]
    @target = hash[:target]
  end
end