Sha256: 4c56fc4d8e20a75a64ecff6b87399917b3b4ab2dd87ff95d989f8d00a7ede66c
Contents?: true
Size: 854 Bytes
Versions: 3
Compression:
Stored size: 854 Bytes
Contents
require "yaml" module Linner class Environment def initialize(path) @env ||= (YAML::load(File.read path) || Hash.new) @convension = YAML::load File.read(File.join File.dirname(__FILE__), "../../vendor", "config.default.yml") @env = @convension.rmerge!(@env) end def paths groups.map { |group| group["paths"] }.flatten.uniq end %w(app test vendor public).each do |method| define_method("#{method}_folder") do @env["paths"][method] end end def notification @env["notification"] end def modules_ignored Dir.glob(@env["modules"]["ignored"]) end def wrapper @env["modules"]["wrapper"] end def definition File.join public_folder, @env["modules"]["definition"] end def groups @env["groups"].values end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
linner-0.3.2 | lib/linner/environment.rb |
linner-0.3.1 | lib/linner/environment.rb |
linner-0.3.0 | lib/linner/environment.rb |