Class: Glimmer::DSL::Web::ListenerExpression

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

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/glimmer/dsl/web/listener_expression.rb', line 7

def can_interpret?(parent, keyword, *args, &block)
  parent and
    parent.respond_to?(:can_handle_observation_request?) and
    parent.can_handle_observation_request?(keyword)
end

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



13
14
15
# File 'lib/glimmer/dsl/web/listener_expression.rb', line 13

def interpret(parent, keyword, *args, &block)
  parent.handle_observation_request(keyword, block)
end