lib/danica/function/name.rb in danica-2.6.4 vs lib/danica/function/name.rb in danica-2.7.1
- old
+ new
@@ -6,21 +6,23 @@
def initialize(name:, variables:)
@name = name || :f
@containers = variables.map { |v| wrap_value(v) }
end
- def to(format)
- "#{name}(#{description_variables(format)})"
+ def to(*args)
+ "#{name}(#{description_variables(*args)})"
end
def variables
containers.map(&:content)
end
private
- def description_variables(format)
- variables_for(format).map { |v| v.to(format) }.join(', ')
+ def description_variables(format, **options)
+ variables_for(format).map do |value|
+ value.to(format, options)
+ end.join(', ')
end
def variables_for(format)
case format.to_sym
when :tex