Class: MathExpansion::Matriz
- Inherits:
-
Object
- Object
- MathExpansion::Matriz
- Defined in:
- lib/math_expansion/matriz.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#contenido ⇒ Object
Returns the value of attribute contenido.
-
#M ⇒ Object
readonly
Returns the value of attribute M.
-
#N ⇒ Object
readonly
Returns the value of attribute N.
Instance Method Summary collapse
-
#initialize(n, m) ⇒ Matriz
constructor
A new instance of Matriz.
Constructor Details
#initialize(n, m) ⇒ Matriz
Returns a new instance of Matriz.
8 9 10 11 12 |
# File 'lib/math_expansion/matriz.rb', line 8 def initialize(n, m) raise ArgumentError, 'Indice no valido' unless n.is_a? Fixnum and n > 0 and m.is_a? Fixnum and m > 0 @N, @M = n, m end |
Instance Attribute Details
#contenido ⇒ Object
Returns the value of attribute contenido.
6 7 8 |
# File 'lib/math_expansion/matriz.rb', line 6 def contenido @contenido end |
#M ⇒ Object (readonly)
Returns the value of attribute M.
5 6 7 |
# File 'lib/math_expansion/matriz.rb', line 5 def M @M end |
#N ⇒ Object (readonly)
Returns the value of attribute N.
5 6 7 |
# File 'lib/math_expansion/matriz.rb', line 5 def N @N end |