class Rivet::BaseConfig
Attributes
bootstrap[RW]
name[R]
Public Class Methods
from_file(dsl_file, load_path='.')
click to toggle source
# File lib/rivet/common/base_config.rb, line 8 def self.from_file(dsl_file, load_path='.') name = File.basename(dsl_file, '.rb') data = Proc.new { eval(File.read(dsl_file)) } new(name, load_path, &data) end
new(name, load_path='.', &block)
click to toggle source
Calls superclass method
# File lib/rivet/common/base_config.rb, line 14 def initialize(name, load_path='.', &block) super() @name = name @path = load_path @bootstrap = OpenState.new instance_eval(&block) if block end
Public Instance Methods
normalize_security_groups()
click to toggle source
# File lib/rivet/common/base_config.rb, line 35 def normalize_security_groups security_groups.sort end
path(*args)
click to toggle source
# File lib/rivet/common/base_config.rb, line 22 def path(*args) if args.size < 1 @path else File.join(@path, *args) end end
post(&block)
click to toggle source
# File lib/rivet/common/base_config.rb, line 30 def post(&block) return @block if block.nil? @block = block end
Protected Instance Methods
import(import_path)
click to toggle source
# File lib/rivet/common/base_config.rb, line 41 def import(import_path) lambda { eval(File.read(import_path)) }.call end