class Coppertone::Mechanism::IncludeMatcher
Implements the include mechanism.
Attributes
record[R]
Public Class Methods
new(record)
click to toggle source
# File lib/coppertone/mechanism/include_matcher.rb, line 23 def initialize(record) @record = record end
Public Instance Methods
match?(macro_context, request_context)
click to toggle source
# File lib/coppertone/mechanism/include_matcher.rb, line 27 def match?(macro_context, request_context) raise Coppertone::NoneIncludeResultError if record.nil? record_result = IncludeRecordEvaluator.new(record) .evaluate(macro_context, request_context) record_result.pass? end