Module: Elixir::Range

Defined in:
lib/elixir/range.rb

Class Method Summary collapse

Class Method Details

.new(first, last) ⇒ Object



5
6
7
# File 'lib/elixir/range.rb', line 5

def new first, last
  first..last
end

.range?(range) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/elixir/range.rb', line 9

def range? range
  range.instance_of? ::Range
end