Class: CLASP::Arguments::ImmutableArray
- Inherits:
-
Object
- Object
- CLASP::Arguments::ImmutableArray
- Includes:
- Enumerable
- Defined in:
- lib/clasp/arguments.rb
Overview
:nodoc: all
Instance Method Summary collapse
-
#==(rhs) ⇒ Object
:nodoc:.
-
#[](index) ⇒ Object
:nodoc:.
-
#each ⇒ Object
:nodoc:.
-
#empty? ⇒ Boolean
:nodoc:.
-
#initialize(a) ⇒ ImmutableArray
constructor
:nodoc:.
-
#size ⇒ Object
:nodoc:.
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 |
#each ⇒ Object
:nodoc:
192 193 194 195 |
# File 'lib/clasp/arguments.rb', line 192 def each @a.each { |i| yield i } end |
#empty? ⇒ Boolean
:nodoc:
204 205 206 207 |
# File 'lib/clasp/arguments.rb', line 204 def empty? @a.empty? end |
#size ⇒ Object
:nodoc:
198 199 200 201 |
# File 'lib/clasp/arguments.rb', line 198 def size @a.size end |