Class: Range

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

Defined Under Namespace

Classes: Seq

Instance Method Summary collapse

Instance Method Details

#to_seqObject



182
183
184
185
186
187
188
# File 'lib/apricot/ruby_ext.rb', line 182

def to_seq
  if first > last || (first == last && exclude_end?)
    nil
  else
    Seq.new(first, last, exclude_end?)
  end
end