class SpinningWheel::Fabric::DSL

Attributes

attributes[RW]

Public Class Methods

new() click to toggle source
# File lib/spinning_wheel/fabric.rb, line 40
def initialize()
  @attributes = Hash.new
  clean_up_object_methods()
end
run(block) click to toggle source
# File lib/spinning_wheel/fabric.rb, line 34
def self.run(block)
  dsl = self.new
  dsl.instance_eval(&block)
  return dsl.attributes
end

Public Instance Methods

method_missing(name, *args, &block) click to toggle source
# File lib/spinning_wheel/fabric.rb, line 45
def method_missing(name, *args, &block)
  @attributes[name] = block.call
end

Private Instance Methods

clean_up_object_methods() click to toggle source
# File lib/spinning_wheel/fabric.rb, line 51
def clean_up_object_methods
  self.instance_eval('undef :clone')
  self.instance_eval('undef :display')
  self.instance_eval('undef :dup')
  self.instance_eval('undef :extend')
  self.instance_eval('undef :freeze')
  self.instance_eval('undef :frozen?')
  self.instance_eval('undef :inspect')
  self.instance_eval('undef :taint')
  self.instance_eval('undef :tap')
end