Class: Transpec::Syntax::Have::HaveRecord
- Defined in:
- lib/transpec/syntax/have/have_record.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Record
Record::OVERRIDDE_FORBIDDEN_METHODS
Instance Attribute Summary collapse
-
#have ⇒ Object
readonly
Returns the value of attribute have.
Attributes inherited from Record
#converted_syntax_type, #original_syntax_type
Instance Method Summary collapse
- #annotation ⇒ Object
-
#initialize(have) ⇒ HaveRecord
constructor
A new instance of HaveRecord.
Methods inherited from Record
#==, #converted_syntax, #hash, #original_syntax, #to_s
Constructor Details
#initialize(have) ⇒ HaveRecord
Returns a new instance of HaveRecord.
11 12 13 |
# File 'lib/transpec/syntax/have/have_record.rb', line 11 def initialize(have) @have = have end |
Instance Attribute Details
#have ⇒ Object (readonly)
Returns the value of attribute have.
9 10 11 |
# File 'lib/transpec/syntax/have/have_record.rb', line 9 def have @have end |
Instance Method Details
#annotation ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/transpec/syntax/have/have_record.rb', line 15 def annotation return @annotation if instance_variable_defined?(:@annotation) @annotation = if have.accurate_conversion? nil else AccuracyAnnotation.new(have.matcher_range) end end |