Class: LSL::CommandExecution::Args::ArrayWithBlanks

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/lsl/command/args.rb

Instance Method Summary collapse

Instance Method Details

#<<(x) ⇒ Object



15
16
17
18
# File 'lib/lsl/command/args.rb', line 15

def <<(x)
  i = blank_spots.shift || list.length
  list[i] = x
end

#add_list(l) ⇒ Object



19
20
21
22
# File 'lib/lsl/command/args.rb', line 19

def add_list(l)
  blank_spots!
  l.each { |x| self << x }
end

#each(&b) ⇒ Object



7
# File 'lib/lsl/command/args.rb', line 7

def each(&b); list.each(&b); end