class Haml::Parser::DynamicAttributes
@param [String] old - Hash literal including dynamic values or Ruby literal of multiple Hashes which MUST be interpreted as method’s last arguments.
@param [String] new - Hash literal including dynamic values.
def old=(value)
def old=(value) unless value =~ /\A{.*}\z/m raise ArgumentError.new('Old attributes must start with "{" and end with "}"') end super end
def stripped_old
def stripped_old return nil if old.nil? old.sub!(/\A{/, '').sub!(/}\z/m, '') end
def to_literal
def to_literal [new, stripped_old].compact.join(', ') end