Class: Plotty::Sequence::Linear

Inherits:
Struct
  • Object
show all
Defined in:
lib/plotty/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#maxObject

Returns the value of attribute max

Returns:

  • (Object)

    the current value of max



26
27
28
# File 'lib/plotty/graph.rb', line 26

def max
  @max
end

#minObject

Returns the value of attribute min

Returns:

  • (Object)

    the current value of min



26
27
28
# File 'lib/plotty/graph.rb', line 26

def min
  @min
end

#stepObject

Returns the value of attribute step

Returns:

  • (Object)

    the current value of step



26
27
28
# File 'lib/plotty/graph.rb', line 26

def step
  @step
end

Instance Method Details

#each(&block) ⇒ Object



27
28
29
30
31
# File 'lib/plotty/graph.rb', line 27

def each(&block)
	return to_enum unless block_given?
	
	(min..max).step(step, &block)
end