Module: GClouder::Resources::Local

Included in:
Global, Region
Defined in:
lib/gclouder/resources.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



6
7
8
# File 'lib/gclouder/resources.rb', line 6

def self.included(klass)
  klass.extend Local
end

Instance Method Details

#get_section(data, path, silent: false) ⇒ Object

FIXME: error if path doesnt exist..



11
12
13
14
15
16
17
18
# File 'lib/gclouder/resources.rb', line 11

def get_section(data, path, silent: false)
  path.each do |key|
    return [] unless data.key?(key)
    data = data[key]
  end

  data
end