Class: Plotty::Sequence::Linear
- Inherits:
-
Struct
- Object
- Struct
- Plotty::Sequence::Linear
- Defined in:
- lib/plotty/graph.rb
Instance Attribute Summary collapse
-
#max ⇒ Object
Returns the value of attribute max.
-
#min ⇒ Object
Returns the value of attribute min.
-
#step ⇒ Object
Returns the value of attribute step.
Instance Method Summary collapse
Instance Attribute Details
#max ⇒ Object
Returns the value of attribute max
26 27 28 |
# File 'lib/plotty/graph.rb', line 26 def max @max end |
#min ⇒ Object
Returns the value of attribute min
26 27 28 |
# File 'lib/plotty/graph.rb', line 26 def min @min end |
#step ⇒ Object
Returns the value of attribute 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 |