Class: Seimi::Equation::Result
- Inherits:
-
Struct
- Object
- Struct
- Seimi::Equation::Result
- Defined in:
- lib/seimi/equation.rb
Instance Attribute Summary collapse
-
#coefficients ⇒ Object
Returns the value of attribute coefficients.
-
#elements ⇒ Object
Returns the value of attribute elements.
-
#lhs_size ⇒ Object
Returns the value of attribute lhs_size.
-
#matrix ⇒ Object
Returns the value of attribute matrix.
-
#species ⇒ Object
Returns the value of attribute species.
Instance Method Summary collapse
Instance Attribute Details
#coefficients ⇒ Object
Returns the value of attribute coefficients
10 11 12 |
# File 'lib/seimi/equation.rb', line 10 def coefficients @coefficients end |
#elements ⇒ Object
Returns the value of attribute elements
10 11 12 |
# File 'lib/seimi/equation.rb', line 10 def elements @elements end |
#lhs_size ⇒ Object
Returns the value of attribute lhs_size
10 11 12 |
# File 'lib/seimi/equation.rb', line 10 def lhs_size @lhs_size end |
#matrix ⇒ Object
Returns the value of attribute matrix
10 11 12 |
# File 'lib/seimi/equation.rb', line 10 def matrix @matrix end |
#species ⇒ Object
Returns the value of attribute species
10 11 12 |
# File 'lib/seimi/equation.rb', line 10 def species @species end |
Instance Method Details
#to_kobun ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/seimi/equation.rb', line 15 def to_kobun require_relative "kanji" left = kobun_terms(0...lhs_size).join(" ") right = kobun_terms(lhs_size...species.length).join(" ") "#{left} を合せ、#{right} と成り申し候(洋数字にて #{self}) 也" end |
#to_s ⇒ Object
11 12 13 |
# File 'lib/seimi/equation.rb', line 11 def to_s "#{format_side(0...lhs_size)} -> #{format_side(lhs_size...species.length)}" end |