class Rulz::Attribute::Block

Public Class Methods

new(attr, klass, &block) click to toggle source
# File lib/rulz/attribute.rb, line 4
def initialize(attr, klass, &block)
  @attr = attr
  @klass = klass
  instance_eval &block
end

Public Instance Methods

condition(name, &block) click to toggle source
# File lib/rulz/attribute.rb, line 10
def condition(name, &block)
  Rulz::Attribute::Condition.new(@klass, @attr, name, block)
end
type(kind) click to toggle source
# File lib/rulz/attribute.rb, line 14
def type(kind)
  Rulz::Conditions.load_conditions(@klass, @attr, kind)
end