module Gamifier::DSL

Public Class Methods

eval_with_context(new_context, &block) click to toggle source
# File lib/gamifier/dsl.rb, line 8
def eval_with_context(new_context, &block)
  new_context.extend DSL
  if block
    new_context.instance_eval(&block)
  end
  new_context
end

Public Instance Methods

set(key, *args, &block) click to toggle source
# File lib/gamifier/dsl.rb, line 17
def set(key, *args, &block)
  if block
    self.send("#{key}=".to_sym, block)
  else
    self.send("#{key}=".to_sym, *args)
  end
end