Sha256: d0283729bf56c7d4ff04c2a3140c56e6f4cd36c94b722b4711da09a2ff038b51
Contents?: true
Size: 685 Bytes
Versions: 3
Compression:
Stored size: 685 Bytes
Contents
require 'glimmer/dsl/expression' module Glimmer module DSL module Opal class PropertyExpression < StaticExpression include TopLevelExpression def can_interpret?(parent, keyword, *args, &block) parent and parent.respond_to?(:set_attribute) and keyword and block.nil? end def interpret(parent, keyword, *args, &block) if keyword == 'text' # TODO move into property converters in element proxy args = [args.first.to_s.gsub('&', '')] end parent.set_attribute(keyword, *args) args.first.to_s end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems