Class: Literal::Types::KindType
- Inherits:
-
Object
- Object
- Literal::Types::KindType
- Includes:
- Literal::Type
- Defined in:
- lib/literal/types/kind_type.rb
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #===(object) ⇒ Object
-
#initialize(type) ⇒ KindType
constructor
A new instance of KindType.
Methods included from Literal::Type
Constructor Details
#initialize(type) ⇒ KindType
Returns a new instance of KindType.
6 7 8 9 |
# File 'lib/literal/types/kind_type.rb', line 6 def initialize(type) @type = type freeze end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/literal/types/kind_type.rb', line 11 def type @type end |
Instance Method Details
#===(object) ⇒ Object
13 14 15 |
# File 'lib/literal/types/kind_type.rb', line 13 def ===(object) Literal.subtype?(object, @type) end |