# File lib/configuration.rb, line 102 102: def self.evaluate configuration, options = {}, &block 103: dsl = new configuration 104: Pure[dsl].instance_eval(&block) if block 105: options.each{|key, value| Pure[dsl].send key, value} 106: Pure[dsl].instance_eval{ @__configuration } 107: end
# File lib/configuration.rb, line 98 98: def Method m 99: @__configuration.method(m) 100: end
# File lib/configuration.rb, line 94 94: def Send(m, *a, &b) 95: Method(m).call(*a, &b) 96: end
# File lib/configuration.rb, line 117 117: def __configuration__ 118: @__configuration 119: end
# File lib/configuration.rb, line 122 122: def method_missing(m, *a, &b) 123: if(a.empty? and b.nil?) 124: return Pure[@__configuration].send(m, *a, &b) 125: end 126: if b 127: raise ArgumentError unless a.empty? 128: parent = @__configuration 129: name = m.to_s 130: configuration = 131: if @__configuration.respond_to?(name) and Configuration === @__configuration.send(name) 132: @__configuration.send name 133: else 134: Configuration.new name 135: end 136: Pure[configuration].instance_eval{ @__parent = parent } 137: DSL.evaluate configuration, &b 138: value = configuration 139: end 140: unless a.empty? 141: value = a.size == 1 ? a.first : a 142: end 143: @__singleton_class.module_eval do 144: define_method(m){ value } 145: end 146: end
# File lib/configuration.rb, line 151 151: def object_id(*args) 152: unless args.empty? 153: verbose = $VERBOSE 154: begin 155: $VERBOSE = nil 156: define_method(:object_id){ args.first } 157: ensure 158: $VERBOSE = verbose 159: end 160: else 161: return Pure[@__configuration].object_id 162: end 163: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.