Class: Dancer::Defined

Inherits:
Struct
  • Object
show all
Defined in:
lib/dancer/defined.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



2
3
4
# File 'lib/dancer/defined.rb', line 2

def step
  @step
end

Instance Method Details

#extent(start_at, size, exclude_end = false) ⇒ Object

Create a timeslice from a start time and a number of a points



13
14
15
# File 'lib/dancer/defined.rb', line 13

def extent(start_at, size, exclude_end = false)
  Dancer.extent(start_at, size, step, exclude_end)
end

#keys(keys, exclude_end = false) ⇒ Object

Create a timeslice from a list of start times



18
19
20
# File 'lib/dancer/defined.rb', line 18

def keys(keys, exclude_end = false)
  Dancer.keys(keys, step, exclude_end)
end

#new(start_at, end_at, exclude_end = false) ⇒ Object



22
23
24
# File 'lib/dancer/defined.rb', line 22

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

#range(range) ⇒ Object

Create a timeslice from a range



8
9
10
# File 'lib/dancer/defined.rb', line 8

def range(range)
  Dancer.range(range, step)
end

#unboundedObject



3
4
5
# File 'lib/dancer/defined.rb', line 3

def unbounded
  Dancer.unbounded(step)
end