Class: Vanguard::Matcher::Nullary::Primitive
- Inherits:
-
Vanguard::Matcher::Nullary
- Object
- Vanguard::Matcher
- Vanguard::Matcher::Nullary
- Vanguard::Matcher::Nullary::Primitive
- Defined in:
- lib/vanguard/matcher/nullary/primitive.rb
Overview
Matcher that matches primitive types
Instance Attribute Summary collapse
-
#primitive ⇒ Class
readonly
private
Return primitive.
Instance Method Summary collapse
-
#matches?(value) ⇒ true, false
private
Test if value is kind of primitive.
Instance Attribute Details
#primitive ⇒ Class (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return primitive
15 16 17 |
# File 'lib/vanguard/matcher/nullary/primitive.rb', line 15 def primitive @primitive end |
Instance Method Details
#matches?(value) ⇒ true, false
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Test if value is kind of primitive
27 28 29 |
# File 'lib/vanguard/matcher/nullary/primitive.rb', line 27 def matches?(value) value.kind_of?(primitive) end |