class Antelope::DSL::Contexts::Base
The base context, which implements some helper methods.
Attributes
options[R]
Public Class Methods
new(options)
click to toggle source
# File lib/antelope/dsl/contexts/base.rb, line 8 def initialize(options) @options = options @contexts = Hash.new { |h, k| h[k] = k.new(@options) } end
Public Instance Methods
before_call()
click to toggle source
# File lib/antelope/dsl/contexts/base.rb, line 23 def before_call; end
call(&block)
click to toggle source
# File lib/antelope/dsl/contexts/base.rb, line 13 def call(&block) before_call instance_exec(self, &block) data end
context(name, &block)
click to toggle source
# File lib/antelope/dsl/contexts/base.rb, line 19 def context(name, &block) @contexts[name].call(&block) end
data()
click to toggle source
# File lib/antelope/dsl/contexts/base.rb, line 25 def data; end