Class: Plotty::Sequence::Scalar

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



34
35
36
# File 'lib/plotty/graph.rb', line 34

def max
  @max
end

#minObject

Returns the value of attribute min

Returns:

  • (Object)

    the current value of min



34
35
36
# File 'lib/plotty/graph.rb', line 34

def min
  @min
end

#scaleObject

Returns the value of attribute scale

Returns:

  • (Object)

    the current value of scale



34
35
36
# File 'lib/plotty/graph.rb', line 34

def scale
  @scale
end

Instance Method Details

#eachObject



35
36
37
38
39
40
41
42
43
# File 'lib/plotty/graph.rb', line 35

def each
	return to_enum unless block_given?
	
	i = min
	while i <= max
		yield i
		i *= scale
	end
end