Sha256: 94f2c290a6b52ee84e4b12ae420f5db369db4855391c5238186307d646592639
Contents?: true
Size: 567 Bytes
Versions: 3
Compression:
Stored size: 567 Bytes
Contents
module Danica class Function::Name include Common attr_reader :name, :containers def initialize(name:, variables:) @name = name || :f @containers = variables.map { |v| wrap_value(v) } end def to(format) "#{name}(#{description_variables(format)})" end def variables containers.map(&:content) end private def description_variables(format) non_constant_variables.map { |v| v.to(format) }.join(', ') end def non_constant_variables variables.reject(&:constant?) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
danica-2.6.3 | lib/danica/function/name.rb |
danica-2.6.2 | lib/danica/function/name.rb |
danica-2.6.1 | lib/danica/function/name.rb |