Sha256: f5099ba7cea13b004db92396047f7eb78e626bc4d75138aa4d73ec9ab2b4dbaa

Contents?: true

Size: 653 Bytes

Versions: 3

Compression:

Stored size: 653 Bytes

Contents

class Dancer
  Defined = Struct.new(:step) do
    def unbounded
      Dancer.unbounded(step)
    end

    # Create a timeslice from a range
    def range(range)
      Dancer.range(range, step)
    end

    # Create a timeslice from a start time and a number of a points
    def extent(start_at, size, exclude_end = false)
      Dancer.extent(start_at, size, step, exclude_end)
    end

    # Create a timeslice from a list of start times
    def keys(keys, exclude_end = false)
      Dancer.keys(keys, step, exclude_end)
    end

    def new(start_at, end_at, exclude_end = false)
      Dancer.new(start_at, end_at, step, exclude_end)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dancer-0.9.1 lib/dancer/defined.rb
dancer-0.9.0 lib/dancer/defined.rb
dancer-0.1.0 lib/dancer/defined.rb