Class: Array::ArrayType
- Inherits:
-
Object
- Object
- Array::ArrayType
- Defined in:
- lib/array.rb
Instance Method Summary collapse
-
#initialize(type) ⇒ ArrayType
constructor
A new instance of ArrayType.
- #is_type_of?(obj) ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(type) ⇒ ArrayType
Returns a new instance of ArrayType.
4 5 6 |
# File 'lib/array.rb', line 4 def initialize type @type = type end |
Instance Method Details
#is_type_of?(obj) ⇒ Boolean
8 9 10 |
# File 'lib/array.rb', line 8 def is_type_of? obj obj.kind_of? @type end |
#to_s ⇒ Object
12 13 14 |
# File 'lib/array.rb', line 12 def to_s "Array[#{@type}]" end |