class AbRules::Rule

Public Class Methods

new(content, &block) click to toggle source
# File lib/ab_rules.rb, line 3
def initialize(content, &block)
  @content = content
  @block = block
end

Public Instance Methods

apply() click to toggle source
# File lib/ab_rules.rb, line 14
def apply
  @content
end
match?(subjects = {}) click to toggle source
# File lib/ab_rules.rb, line 8
def match?(subjects = {})
  @block ? @block.call(subjects) : true
rescue NoMethodError
  false
end