Sha256: 053318fc029145e53c8a5956af3981da86d09628ee92802f4daf54a4d7a84351
Contents?: true
Size: 561 Bytes
Versions: 32
Compression:
Stored size: 561 Bytes
Contents
module Sass::Script class UnaryOperation # :nodoc: def initialize(operand, operator) @operand = operand @operator = operator end def inspect "(#{@operator.inspect} #{@operand.inspect})" end def perform(environment) operator = "unary_#{@operator}" literal = @operand.perform(environment) literal.send(operator) rescue NoMethodError => e raise e unless e.name.to_s == operator.to_s raise Sass::SyntaxError.new("Undefined unary operation: \"#{@operator} #{literal}\".") end end end
Version data entries
32 entries across 32 versions & 7 rubygems