Class: Dictionaries::GUI::Tk::Dictionary
- Inherits:
-
TkFrame
- Object
- TkFrame
- Dictionaries::GUI::Tk::Dictionary
- Includes:
- Colours::E
- Defined in:
- lib/dictionaries/gui/tk/dictionary.rb
Overview
< Base === Dictionaries::GUI::Tk::Dictionary.new
Class Method Summary collapse
-
.[](i = '') ⇒ Object
# === Dictionaries::GUI:Tk::Dictionary[] ========================================================================= #.
Instance Method Summary collapse
-
#initialize(i = nil, run_already = true) ⇒ Dictionary
constructor
# === initialize ========================================================================= #.
-
#input? ⇒ Boolean
# === input? ========================================================================= #.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
-
#run ⇒ Object
# === run (run tag) ========================================================================= #.
-
#set_input(i = '') ⇒ Object
# === set_input ========================================================================= #.
Constructor Details
#initialize(i = nil, run_already = true) ⇒ Dictionary
#
initialize
#
30 31 32 33 34 35 36 37 38 39 |
# 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 |
Class Method Details
.[](i = '') ⇒ Object
#
Dictionaries::GUI:Tk::Dictionary[]
#
76 77 78 |
# File 'lib/dictionaries/gui/tk/dictionary.rb', line 76 def self.[](i = '') self.new(i) end |
Instance Method Details
#input? ⇒ Boolean
#
input?
#
59 60 61 |
# File 'lib/dictionaries/gui/tk/dictionary.rb', line 59 def input? @input end |
#reset ⇒ Object
#
reset (reset tag)
#
44 45 |
# File 'lib/dictionaries/gui/tk/dictionary.rb', line 44 def reset end |
#run ⇒ Object
#
run (run tag)
#
66 67 68 69 70 71 |
# 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 = '') ⇒ Object
#
set_input
#
50 51 52 53 54 |
# 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 |