Class: CLASP::Arguments::ImmutableArray
- Inherits:
-
Util::ImmutableArray
- Object
- Util::ImmutableArray
- CLASP::Arguments::ImmutableArray
- Defined in:
- lib/clasp/arguments.rb
Overview
:startdoc:
Instance Method Summary collapse
-
#initialize(a) ⇒ ImmutableArray
constructor
A new instance of ImmutableArray.
-
#specified?(id = nil) ⇒ Boolean
returns truthy if the given flag/option is found or the given block is truthy.
Methods inherited from Util::ImmutableArray
#==, #[], #each, #empty?, #find, #length, #size, #slice
Constructor Details
#initialize(a) ⇒ ImmutableArray
186 187 188 189 |
# File 'lib/clasp/arguments.rb', line 186 def initialize a super a end |
Instance Method Details
#specified?(id = nil) ⇒ Boolean
returns truthy if the given flag/option is found or the given block is truthy
193 194 195 196 197 198 |
# File 'lib/clasp/arguments.rb', line 193 def specified? id = nil return find(id) { |o| yield o } if block_given? find { |item| item == id } end |