Class: PrimeTime::PrimeTable
- Defined in:
- lib/prime_time/prime_table.rb
Instance Attribute Summary collapse
-
#primes ⇒ Object
Returns the value of attribute primes.
Attributes inherited from Table
#col_headers, #height, #row_headers, #rows, #width
Instance Method Summary collapse
-
#initialize(n) ⇒ PrimeTable
constructor
A new instance of PrimeTable.
Methods inherited from Table
Constructor Details
#initialize(n) ⇒ PrimeTable
Returns a new instance of PrimeTable.
5 6 7 8 9 |
# File 'lib/prime_time/prime_table.rb', line 5 def initialize(n) @primes = PrimeTime::Calculate.primes(n) super(width: n, height: n) build_table end |
Instance Attribute Details
#primes ⇒ Object
Returns the value of attribute primes.
3 4 5 |
# File 'lib/prime_time/prime_table.rb', line 3 def primes @primes end |