class Dictionaries::GUI::Tk::Dictionary

Public Class Methods

[](i = '') click to toggle source
#

Dictionaries::GUI:Tk::Dictionary[]

#
# File lib/dictionaries/gui/tk/dictionary.rb, line 76
def self.[](i = '')
  self.new(i)
end
new( i = nil, run_already = true ) click to toggle source
#

initialize

#
Calls superclass method
# File lib/dictionaries/gui/tk/dictionary.rb, line 30
def initialize(
    i           = nil,
    run_already = true
  )
  super()
  reset
  set_input(i)
  title "TK wrapper for the Dictionaries project"
  run if run_already
end

Public Instance Methods

input?() click to toggle source
#

input?

#
# File lib/dictionaries/gui/tk/dictionary.rb, line 59
def input?
  @input
end
reset() click to toggle source
#

reset (reset tag)

#
# File lib/dictionaries/gui/tk/dictionary.rb, line 44
def reset
end
run() click to toggle source
#

run (run tag)

#
# File lib/dictionaries/gui/tk/dictionary.rb, line 66
def run
  TkLabel.new(root) do
   text 'Hello, World!'
   pack { padx 15 ; pady 15; side 'left' }
  end
end
set_input(i = '') click to toggle source
#

set_input

#
# File lib/dictionaries/gui/tk/dictionary.rb, line 50
def set_input(i = '')
  i = i.first if i.is_a? Array
  i = i.to_s.dup
  @input = i
end