Sha256: 58857b27e46b402ce8c62d33ecfc2dcd8dccc44f25248f38f3340adbdb5871d6

Contents?: true

Size: 569 Bytes

Versions: 1

Compression:

Stored size: 569 Bytes

Contents

require "figs/application"
require "figs/env"
require "figs/figfile"
require "figs/directory_flattener"

module Figs
  extend self

  attr_writer :backend, :application

  def env
    application.env
  end
  
  def backend
    @backend ||= Figs::Application
  end

  def application(options = {})
    @application ||= backend.new({:file => figfile, :stage => options[:stage]})
  end

  def load(options = {})
    application({:stage => options[:stage]}).load
  end
  
  private
  
  def figfile
    @figfile ||=YAML.load(ERB.new(File.read('Figfile')).result)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
figs-1.2.3 lib/figs.rb