Class: Lookout::Literal
Overview
Proxies objects that should be literally expected. This is achieved by overriding #to_lookout_expected to wrap the object in a Expected::Object instead of using whatever #to_lookout_expected on the object would normally return. This allows us to expect a literal Range instead of allowing either a Range or an item included in the range.
Instance Method Summary collapse
- #inspect ⇒ Object
-
#to_lookout_expected ⇒ Expected::Object
An expected value wrapper around the expected value.
Instance Method Details
#inspect ⇒ Object
13 |
# File 'lib/lookout-3.0/literal.rb', line 13 def inspect; 'literal(%p)' % output end |
#to_lookout_expected ⇒ Expected::Object
Returns An expected value wrapper around the expected value.
17 |
# File 'lib/lookout-3.0/literal.rb', line 17 def to_lookout_expected; Lookout::Expected::Object.new(@expected) end |