class Deranged::Formatter

Attributes

range[R]

Public Class Methods

new(range) click to toggle source
# File lib/deranged/formatter.rb, line 3
def initialize(range)
  @range = range
end

Public Instance Methods

to_s() click to toggle source

TODO: support multiple and custom formats

# File lib/deranged/formatter.rb, line 8
def to_s
  return '' if range.nil?
  [range.min, range.max].uniq.join('-')
end