class Glimmer::DSL::Opal::PropertyExpression

Public Instance Methods

can_interpret?(parent, keyword, *args, &block) click to toggle source
# File lib/glimmer/dsl/opal/property_expression.rb, line 8
def can_interpret?(parent, keyword, *args, &block)
  parent and
    (!args.empty?) and
    parent.respond_to?(:set_attribute) and
    parent.respond_to?(keyword, *args) and
    keyword and
    block.nil?
end
interpret(parent, keyword, *args, &block) click to toggle source
# File lib/glimmer/dsl/opal/property_expression.rb, line 17
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