class Regressor::Model::Expression
Attributes
expectation[RW]
matcher[RW]
matcher_expectation[RW]
modification[RW]
subject[RW]
Public Class Methods
new(subject, expectation, matcher, matcher_expectation, modification = nil)
click to toggle source
# File lib/model/expression.rb, line 7 def initialize(subject, expectation, matcher, matcher_expectation, modification = nil) self.subject = subject self.expectation = expectation self.matcher = matcher self.matcher_expectation = matcher_expectation self.modification = modification end
Public Instance Methods
to_s()
click to toggle source
# File lib/model/expression.rb, line 15 def to_s if self.modification.nil? "it { #{self.subject}.#{self.expectation} #{self.matcher}(:#{self.matcher_expectation}) }" else "it { #{self.subject}.#{self.expectation} #{self.matcher}(:#{self.matcher_expectation}).#{self.modification} }" end end