Class: Glimmer::DSL::Web::PropertyExpression

Inherits:
Expression
  • Object
show all
Defined in:
lib/glimmer/dsl/web/property_expression.rb

Instance Method Summary collapse

Instance Method Details

#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
# File 'lib/glimmer/dsl/web/property_expression.rb', line 9

def can_interpret?(parent, keyword, *args, &block)
  parent.is_a?(Glimmer::Web::ElementProxy) and
    (!args.empty?) and
    parent.respond_to?("#{keyword}=") and
    block.nil?
end

#interpret(parent, keyword, *args, &block) ⇒ Object



16
17
18
19
# File 'lib/glimmer/dsl/web/property_expression.rb', line 16

def interpret(parent, keyword, *args, &block)
  parent.send("#{keyword}=", *args)
  args
end