Class: Glimmer::DSL::Tk::RootExpression

Inherits:
StaticExpression
  • Object
show all
Includes:
ParentExpression, TopLevelExpression
Defined in:
lib/glimmer/dsl/tk/root_expression.rb

Instance Method Summary collapse

Instance Method Details

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



44
45
46
47
# File 'lib/glimmer/dsl/tk/root_expression.rb', line 44

def add_content(parent, keyword, *args, &block)
  super
  parent.post_add_content
end

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

Returns:

  • (Boolean)


34
35
36
37
# File 'lib/glimmer/dsl/tk/root_expression.rb', line 34

def can_interpret?(parent, keyword, *args, &block)
  keyword == 'root' and
    (parent.nil? or parent.is_a?(Glimmer::Tk::RootProxy))
end

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



39
40
41
42
# File 'lib/glimmer/dsl/tk/root_expression.rb', line 39

def interpret(parent, keyword, *args, &block)
  args = [parent] + args unless parent.nil?
  Glimmer::Tk::RootProxy.new(*args, &block)
end