Class: VerifiedDouble::ExampleMetadata
- Inherits:
-
Struct
- Object
- Struct
- VerifiedDouble::ExampleMetadata
- Defined in:
- lib/verified_double/example_metadata.rb
Instance Attribute Summary collapse
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Instance Method Summary collapse
- #described_class ⇒ Object
- #description ⇒ Object
- #method_signature_string ⇒ Object
- #verified_signature ⇒ Object
Instance Attribute Details
#metadata ⇒ Object
Returns the value of attribute metadata
2 3 4 |
# File 'lib/verified_double/example_metadata.rb', line 2 def @metadata end |
Instance Method Details
#described_class ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/verified_double/example_metadata.rb', line 3 def described_class if description.is_a?(Module) description elsif description.is_a?(String) ExampleMetadata.new([:example_group]).described_class else raise end end |
#description ⇒ Object
13 14 15 |
# File 'lib/verified_double/example_metadata.rb', line 13 def description [:description_args][0] end |
#method_signature_string ⇒ Object
17 18 19 20 21 22 23 24 25 |
# File 'lib/verified_double/example_metadata.rb', line 17 def method_signature_string if description =~ /^[\.\#]/ description elsif description.nil? raise else ExampleMetadata.new([:example_group]).method_signature_string end end |
#verified_signature ⇒ Object
27 28 29 |
# File 'lib/verified_double/example_metadata.rb', line 27 def verified_signature "#{described_class}#{method_signature_string}" end |