class Convection::Model::Template::Condition::ConditionalFunction

Public Class Methods

new(function_name, arg_array) click to toggle source
# File lib/convection/model/template/condition.rb, line 35
def initialize(function_name, arg_array)
  @function_name = function_name
  @function_arguments = arg_array
end

Public Instance Methods

render() click to toggle source
# File lib/convection/model/template/condition.rb, line 40
def render
  rendered_values = Array(@function_arguments).map do |function_arg|
    function_arg.respond_to?(:render) ? function_arg.render : function_arg
  end

  { CONDITIONAL_FUNCTION_SYNTAX_MAP[@function_name] => rendered_values }
end