Sha256: 69d6e1bce6295fd967b0a154f0bd4128d0d01874e18172e7563549c69a2cd979
Contents?: true
Size: 892 Bytes
Versions: 23
Compression:
Stored size: 892 Bytes
Contents
require File.join(File.dirname(__FILE__), 'functions') module Sass module Script class Funcall # :nodoc: attr_reader :name, :args def initialize(name, args) @name = name @args = args end def inspect "#{name}(#{args.map {|a| a.inspect}.join(', ')})" end def perform(environment) args = self.args.map {|a| a.perform(environment)} unless Haml::Util.has?(:public_instance_method, Functions, name) && name !~ /^__/ return Script::String.new("#{name}(#{args.map {|a| a.perform(environment)}.join(', ')})") end return Functions::EvaluationContext.new(environment.options).send(name, *args) rescue ArgumentError => e raise e unless e.backtrace.first =~ /:in `(#{name}|perform)'$/ raise Sass::SyntaxError.new("#{e.message} for `#{name}'") end end end end
Version data entries
23 entries across 23 versions & 2 rubygems