Class: Danica::Function
- Inherits:
-
Object
- Object
- Danica::Function
- Includes:
- DSL, Expressable, VariablesHolder
- Defined in:
- lib/danica/function.rb
Defined Under Namespace
Classes: Name
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Expressable
Methods included from VariablesHolder
#calculate, #initialize, #variables=
Methods included from Common
#content, #formatted, #gnu, #tex, #to_f, #to_gnu, #to_tex, #valued?
Methods included from DSL
build, #function, register, register_class, register_operator, register_wrapper
Instance Attribute Details
Class Method Details
.for(expression_class) ⇒ Object
15 16 17 18 19 |
# File 'lib/danica/function.rb', line 15 def self.for(expression_class) build(expression_class.variables_hash) do expression_class.new(variables_hash) end end |
Instance Method Details
#to(*args) ⇒ Object
25 26 27 |
# File 'lib/danica/function.rb', line 25 def to(*args) "#{name.to(*args)} = #{function_block.to(*args)}" end |