class DuckPond::Clause
Attributes
block[R]
options[R]
Public Class Methods
new(opts={}, block)
click to toggle source
initialize
# File lib/duckpond/clause.rb, line 14 def initialize(opts={}, block) @options = opts @block = block end
Public Instance Methods
legal_assesment()
click to toggle source
# File lib/duckpond/clause.rb, line 23 def legal_assesment # it is the responsibility of clauses to provide a #legal_assesment # method - this should return a lawyer who is either satisfied or # not satisfied that the subject fulfills the clause. raise NotImplementedError end
satisfied_by?(subject)
click to toggle source
# File lib/duckpond/clause.rb, line 19 def satisfied_by?(subject) self.legal_assesment(subject).satisfied? end