Class: NilClass

Inherits:
Object show all
Includes:
Enumerable
Defined in:
lib/apricot/ruby_ext.rb

Instance Method Summary collapse

Methods included from Enumerable

#to_list

Instance Method Details

#eachObject



239
240
# File 'lib/apricot/ruby_ext.rb', line 239

def each
end

#empty?Boolean

Returns:

  • (Boolean)


242
243
244
# File 'lib/apricot/ruby_ext.rb', line 242

def empty?
  true
end

#firstObject



254
255
256
# File 'lib/apricot/ruby_ext.rb', line 254

def first
  nil
end

#nextObject



258
259
260
# File 'lib/apricot/ruby_ext.rb', line 258

def next
  nil
end

#restObject



262
263
264
# File 'lib/apricot/ruby_ext.rb', line 262

def rest
  Apricot::List::EMPTY_LIST
end

#to_seqObject

Seq Methods Many functions that return seqs occasionally return nil, so it’s convenient if nil can respond to some of the same methods as seqs.



250
251
252
# File 'lib/apricot/ruby_ext.rb', line 250

def to_seq
  nil
end