Class: Kl::Absvector

Inherits:
Array
  • Object
show all
Defined in:
lib/kl/absvector.rb

Overview

Absvectors are just arrays. We give them their own subclass to support the absvector? primitive.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(n) ⇒ Absvector

Returns a new instance of Absvector.



7
8
9
10
# File 'lib/kl/absvector.rb', line 7

def initialize(n)
  super(n, :"shen.fail!")
  @upper_limit = n
end

Instance Attribute Details

#upper_limitObject (readonly)

Returns the value of attribute upper_limit.



5
6
7
# File 'lib/kl/absvector.rb', line 5

def upper_limit
  @upper_limit
end