Class: Glimmer::DSL::Tk::FormatExpression

Inherits:
StaticExpression
  • Object
show all
Defined in:
lib/glimmer/dsl/tk/format_expression.rb

Instance Method Summary collapse

Instance Method Details

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

Returns:

  • (Boolean)


29
30
31
# File 'lib/glimmer/dsl/tk/format_expression.rb', line 29

def can_interpret?(parent, keyword, *args, &block)
  super && parent.is_a?(Glimmer::Tk::SpinboxProxy) && args.size == 1 && block.nil?
end

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



33
34
35
# File 'lib/glimmer/dsl/tk/format_expression.rb', line 33

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