Class: Literal::Types::IntegerType
- Inherits:
-
Object
- Object
- Literal::Types::IntegerType
- Defined in:
- lib/literal/types/integer_type.rb
Instance Method Summary collapse
- #===(other) ⇒ Object
-
#initialize(range) ⇒ IntegerType
constructor
A new instance of IntegerType.
- #inspect ⇒ Object
Constructor Details
#initialize(range) ⇒ IntegerType
Returns a new instance of IntegerType.
2 3 4 |
# File 'lib/literal/types/integer_type.rb', line 2 def initialize(range) @range = range end |
Instance Method Details
#===(other) ⇒ Object
10 11 12 |
# File 'lib/literal/types/integer_type.rb', line 10 def ===(other) other.is_a?(::Integer) && @range === other end |
#inspect ⇒ Object
6 7 8 |
# File 'lib/literal/types/integer_type.rb', line 6 def inspect "Integer(#{@range})" end |