Class: CLASP::Arguments::ImmutableArray

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/clasp/arguments.rb

Overview

:nodoc: all

Instance Method Summary collapse

Constructor Details

#initialize(a) ⇒ ImmutableArray

:nodoc:



186
187
188
189
# File 'lib/clasp/arguments.rb', line 186

def initialize(a)

	@a = a
end

Instance Method Details

#==(rhs) ⇒ Object

:nodoc:



216
217
218
219
220
# File 'lib/clasp/arguments.rb', line 216

def ==(rhs)

	return rhs == @a if rhs.is_a? self.class
	@a == rhs
end

#[](index) ⇒ Object

:nodoc:



210
211
212
213
# File 'lib/clasp/arguments.rb', line 210

def [](index)

	@a[index]
end

#eachObject

:nodoc:



192
193
194
195
# File 'lib/clasp/arguments.rb', line 192

def each

	@a.each { |i| yield i }
end

#empty?Boolean

:nodoc:

Returns:

  • (Boolean)


204
205
206
207
# File 'lib/clasp/arguments.rb', line 204

def empty?

	@a.empty?
end

#sizeObject

:nodoc:



198
199
200
201
# File 'lib/clasp/arguments.rb', line 198

def size

	@a.size
end