Class: Danica::Equation

Inherits:
Object
  • Object
show all
Includes:
VariablesHolder
Defined in:
lib/danica/equation.rb

Defined Under Namespace

Classes: Builder

Class Method Summary collapse

Instance Method Summary collapse

Methods included from VariablesHolder

#calculate, #initialize, #variables=

Methods included from Common

#content, #formatted, #gnu, #tex, #to_f, #to_gnu, #to_tex, #valued?

Class Method Details

.build(*variables, &block) ⇒ Object



10
11
12
# File 'lib/danica/equation.rb', line 10

def build(*variables, &block)
  Builder.new(*variables, &block).build
end

.create(*variables, &block) ⇒ Object



14
15
16
# File 'lib/danica/equation.rb', line 14

def create(*variables, &block)
  build(*variables, &block).new
end

Instance Method Details

#to(*args) ⇒ Object



19
20
21
# File 'lib/danica/equation.rb', line 19

def to(*args)
  "#{left.to(*args)} = #{right.to(*args)}"
end