Class: Glimmer::DSL::SWT::CursorExpression
- Inherits:
-
Expression
- Object
- Expression
- Glimmer::DSL::SWT::CursorExpression
- Defined in:
- lib/glimmer/dsl/swt/cursor_expression.rb
Overview
cursor expression Note: Cannot be a static expression because it clashes with cursor property expression
Instance Method Summary collapse
- #can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
- #interpret(parent, keyword, *args, &block) ⇒ Object
Instance Method Details
#can_interpret?(parent, keyword, *args, &block) ⇒ Boolean
31 32 33 34 35 36 |
# File 'lib/glimmer/dsl/swt/cursor_expression.rb', line 31 def can_interpret?(parent, keyword, *args, &block) keyword.to_s == 'cursor' and (parent.nil? or !parent.respond_to?('cursor')) and args.size == 1 and (args.first.is_a?(Integer) or textual?(args.first)) end |
#interpret(parent, keyword, *args, &block) ⇒ Object
38 39 40 |
# File 'lib/glimmer/dsl/swt/cursor_expression.rb', line 38 def interpret(parent, keyword, *args, &block) Glimmer::SWT::CursorProxy.new(*args) end |