Class: Dentaku::AST::StringFunctions::Concat

Inherits:
Base show all
Defined in:
lib/dentaku/ast/functions/string_functions.rb

Constant Summary

Constants inherited from Function

Function::DIG

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#negative_argument_failure, #type

Methods inherited from Function

#dependencies, get, numeric, register, register_class, registry

Methods inherited from Node

arity, #dependencies, peek, precedence, #type

Constructor Details

#initialize(*args) ⇒ Concat

Returns a new instance of Concat.



130
131
132
# File 'lib/dentaku/ast/functions/string_functions.rb', line 130

def initialize(*args)
  super
end

Class Method Details

.max_param_countObject



126
127
128
# File 'lib/dentaku/ast/functions/string_functions.rb', line 126

def self.max_param_count
  Float::INFINITY
end

.min_param_countObject



122
123
124
# File 'lib/dentaku/ast/functions/string_functions.rb', line 122

def self.min_param_count
  1
end

Instance Method Details

#value(context = {}) ⇒ Object



134
135
136
# File 'lib/dentaku/ast/functions/string_functions.rb', line 134

def value(context = {})
  @args.map { |arg| arg.value(context).to_s }.join
end