Sha256: c659c964da62bd7a5f4817f5db4c764ebaacf9469ba161d5b858b09f7060d009

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

# Main Container module to namespace the application and its various parts
# are submodules inside this module.
module AppConfig
  using Camelizer

  def self.included(klass)
    config = YAML.load_file(path_finder)

    Dir.glob File.expand_path('../app_config/*.rb', __FILE__) do |file|
      require file

      # Set app configration from config.yaml
      file_basename = File.basename(file, '.rb')
      (klass.const_get file_basename.camelize).options config
    end
  end

  def self.path_finder
    if File.exist?('config.yaml')
      'config.yaml'
    else
      File.expand_path('~/.collage/config.yaml', __FILE__)
    end
  end
end

require_relative 'version'
require_relative 'post_install'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
flickr_collager-0.0.1 lib/app_config.rb