dictionaries 0.2.191

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of dictionaries might be problematic. Click here for more details.

Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +151 -0
  3. data/bin/dictionaries +7 -0
  4. data/bin/unique_words_in_this_file +7 -0
  5. data/dictionaries.gemspec +85 -0
  6. data/doc/README.gen +123 -0
  7. data/lib/dictionaries/ask_english_word.rb +141 -0
  8. data/lib/dictionaries/ask_italian_word.rb +84 -0
  9. data/lib/dictionaries/class/ask_word_from_dictionary.rb +693 -0
  10. data/lib/dictionaries/class/colours.rb +55 -0
  11. data/lib/dictionaries/class/constants.rb +16 -0
  12. data/lib/dictionaries/class/set_search_for_this_word.rb +163 -0
  13. data/lib/dictionaries/commandline/parse_commandline.rb +60 -0
  14. data/lib/dictionaries/constants.rb +133 -0
  15. data/lib/dictionaries/gui/gtk2/dictionary.rb +36 -0
  16. data/lib/dictionaries/gui/gtk3/dictionary/dictionary.rb +34 -0
  17. data/lib/dictionaries/gui/shared_code/dictionaries/dictionary_module.rb +362 -0
  18. data/lib/dictionaries/gui/tk/README.md +2 -0
  19. data/lib/dictionaries/gui/tk/dictionary.rb +85 -0
  20. data/lib/dictionaries/project/project_base_directory.rb +22 -0
  21. data/lib/dictionaries/project/project_yaml_directory.rb +25 -0
  22. data/lib/dictionaries/require_project/require_project.rb +11 -0
  23. data/lib/dictionaries/sinatra/app.rb +105 -0
  24. data/lib/dictionaries/sinatra/english_to_german.rb +82 -0
  25. data/lib/dictionaries/toplevel_methods/e.rb +16 -0
  26. data/lib/dictionaries/toplevel_methods/english_to_german.rb +31 -0
  27. data/lib/dictionaries/toplevel_methods/has_key.rb +32 -0
  28. data/lib/dictionaries/toplevel_methods/is_on_roebe.rb +16 -0
  29. data/lib/dictionaries/toplevel_methods/main_file.rb +88 -0
  30. data/lib/dictionaries/toplevel_methods/misc.rb +129 -0
  31. data/lib/dictionaries/toplevel_methods/module_methods.rb +9 -0
  32. data/lib/dictionaries/toplevel_methods/show_help.rb +30 -0
  33. data/lib/dictionaries/version/version.rb +17 -0
  34. data/lib/dictionaries/yaml/chinese.yml +21 -0
  35. data/lib/dictionaries/yaml/danish.yml +4 -0
  36. data/lib/dictionaries/yaml/deutsche_fremdwoerter.yml +1 -0
  37. data/lib/dictionaries/yaml/dutch.yml +3 -0
  38. data/lib/dictionaries/yaml/english.yml +2419 -0
  39. data/lib/dictionaries/yaml/farsi.yml +8 -0
  40. data/lib/dictionaries/yaml/finnish.yml +2 -0
  41. data/lib/dictionaries/yaml/italian.yml +499 -0
  42. data/lib/dictionaries/yaml/japanese.yml +15 -0
  43. data/lib/dictionaries/yaml/portugese.yml +42 -0
  44. data/lib/dictionaries/yaml/russian.yml +10 -0
  45. data/lib/dictionaries/yaml/spanish.yml +130 -0
  46. data/lib/dictionaries/yaml/swedish.yml +101 -0
  47. data/lib/dictionaries.rb +1 -0
  48. metadata +208 -0
@@ -0,0 +1,362 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Dictionaries::GUI::Gtk::DictionaryModule
6
+ # =========================================================================== #
7
+ # require 'dictionaries/gui/shared_code/dictionaries/dictionary_module.rb'
8
+ # include ::Dictionaries::GUI::Gtk::DictionaryModule
9
+ # =========================================================================== #
10
+ module Dictionaries
11
+
12
+ module GUI
13
+
14
+ module Gtk
15
+
16
+ module DictionaryModule
17
+
18
+ require 'dictionaries/toplevel_methods/e.rb'
19
+ require 'dictionaries/toplevel_methods/misc.rb'
20
+
21
+ require 'dictionaries/class/ask_word_from_dictionary.rb'
22
+
23
+ require 'gtk_paradise/requires/require_the_base_module.rb'
24
+ include ::Gtk::BaseModule
25
+
26
+ include ::Colours
27
+
28
+ # ========================================================================= #
29
+ # === NAMESPACE
30
+ # ========================================================================= #
31
+ NAMESPACE = inspect
32
+
33
+ # ========================================================================= #
34
+ # === WIDTH
35
+ # ========================================================================= #
36
+ WIDTH = 1080
37
+
38
+ # ========================================================================= #
39
+ # === HEIGHT
40
+ # ========================================================================= #
41
+ HEIGHT = 800
42
+
43
+ # ========================================================================= #
44
+ # === TITLE
45
+ # ========================================================================= #
46
+ TITLE = 'Dictionary'
47
+
48
+ # ========================================================================= #
49
+ # === initialize
50
+ # ========================================================================= #
51
+ def initialize(
52
+ run_already = true
53
+ )
54
+ super(:vertical)
55
+ reset
56
+ run if run_already
57
+ end
58
+
59
+ # ========================================================================= #
60
+ # === reset
61
+ # ========================================================================= #
62
+ def reset
63
+ set_use_this_font(:dejavu_condensed_25)
64
+ # ======================================================================= #
65
+ # === @configuration
66
+ # ======================================================================= #
67
+ @configuration = [true, __dir__, NAMESPACE]
68
+ # ======================================================================= #
69
+ # === @title
70
+ # ======================================================================= #
71
+ @title = TITLE
72
+ # ======================================================================= #
73
+ # === @width
74
+ # ======================================================================= #
75
+ @width = WIDTH
76
+ # ======================================================================= #
77
+ # === @height
78
+ # ======================================================================= #
79
+ @height = HEIGHT
80
+ # ======================================================================= #
81
+ # === @dictionaries
82
+ # ======================================================================= #
83
+ @dictionaries = Dictionaries.new(:do_not_run_yet)
84
+ Dictionaries.set_main_file(:default)
85
+ @dictionaries.load_the_english_file
86
+ set_gtk_font_size :default
87
+ end
88
+
89
+ # ========================================================================= #
90
+ # === padding?
91
+ # ========================================================================= #
92
+ def padding?
93
+ 2
94
+ end
95
+
96
+ # ========================================================================= #
97
+ # === border_size?
98
+ # ========================================================================= #
99
+ def border_size?
100
+ 2
101
+ end
102
+
103
+ # ========================================================================= #
104
+ # === e
105
+ # ========================================================================= #
106
+ def e(i = '')
107
+ ::Dictionaries.e(i)
108
+ end
109
+
110
+ # ========================================================================= #
111
+ # === add_ask_the_question_button
112
+ # ========================================================================= #
113
+ def add_ask_the_question_button
114
+ button = gtk_bold_button('Translate into german')
115
+ button.fancy_tooltip =
116
+ 'Click this button in order to <b>translate the english '\
117
+ 'word into the german equivalent word</b>.'
118
+ button.on_clicked {
119
+ button_pressed_so_try_to_convert_the_input
120
+ }
121
+ button.modify_background(:normal, :khaki) # ← default colour
122
+ button.modify_background(:prelight, :paleturquoise) # ← mouse-on-over events
123
+ button.modify_background(:active, :slategray) # ← colour on mouse-press-event
124
+ minimal(button, 0)
125
+ end
126
+
127
+ # ========================================================================= #
128
+ # === create_input_field_on_top
129
+ #
130
+ # This is the main widget for user input. The user types in some
131
+ # words, and then hits the main button on the bottom, in order
132
+ # to translate the (english) word to german.
133
+ # ========================================================================= #
134
+ def create_input_field_on_top
135
+ text_for_the_label = 'Input an english word in the field below'
136
+ text = gtk_label(text_for_the_label)
137
+
138
+ if use_gtk2?
139
+ text.set_markup(
140
+ '<span size="x-large" weight="bold">'+text_for_the_label+'</span>',
141
+ true
142
+ )
143
+ else
144
+ text.set_markup(
145
+ '<span size="x-large" weight="bold">'+text_for_the_label+'</span>',
146
+ use_underline: true
147
+ )
148
+ end
149
+
150
+ # ======================================================================= #
151
+ # Add the "input field" next for the english word that is to
152
+ # be translated.
153
+ # ======================================================================= #
154
+ @input_field = gtk_input_field
155
+ completion = gtk_entry_completion
156
+ @input_field.completion = completion # Assign the completion.
157
+ completion_model = ::Gtk::ListStore.new(String)
158
+ @dictionaries.array.each { |word|
159
+ iter = completion_model.append
160
+ iter[0] = word
161
+ }
162
+ completion.model = completion_model
163
+ # ======================================================================= #
164
+ # Use model column 0 as the text column
165
+ # ======================================================================= #
166
+ completion.text_column = 0
167
+ @input_field.center
168
+ @input_field.on_key_press_event { |widget, event|
169
+ case Gdk::Keyval.to_name(event.keyval)
170
+ when 'Return', 'KP_Enter'
171
+ button_pressed_so_try_to_convert_the_input
172
+ end
173
+ }
174
+ hbox_holding_label_and_input_field = gtk_vbox(
175
+ text, @input_field
176
+ )
177
+ minimal(hbox_holding_label_and_input_field, 4)
178
+ end
179
+
180
+ # ========================================================================= #
181
+ # === create_answer_field
182
+ #
183
+ # This method builds up the "answer-widget".
184
+ # ========================================================================= #
185
+ def create_answer_field
186
+ @answer_field = gtk_input_field
187
+ @answer_field.center
188
+ end
189
+
190
+ # ========================================================================= #
191
+ # === button_pressed_so_try_to_convert_the_input (click tag)
192
+ #
193
+ # This action is called when the user clicks on the button.
194
+ # ========================================================================= #
195
+ def button_pressed_so_try_to_convert_the_input
196
+ user_input = @input_field.return_input
197
+ unless user_input.empty? # We check whether the user did input something.
198
+ translated_word = @dictionaries.translate(user_input)
199
+ e "#{sfancy(user_input)} → #{simp(translated_word)}"
200
+ @answer_field.set_text(translated_word)
201
+ end
202
+ end
203
+
204
+ # ========================================================================= #
205
+ # === add_the_widget_for_remote_query_of_the_dictionary_at_leo (bottom tag)
206
+ #
207
+ # This is the bottom widget.
208
+ # ========================================================================= #
209
+ def add_the_widget_for_remote_query_of_the_dictionary_at_leo
210
+ bottom_vbox = gtk_vbox
211
+ bold_label = gtk_bold_label(
212
+ 'Query from a remote website instead (more entries available)'
213
+ )
214
+ bottom_vbox.minimal(
215
+ bold_label
216
+ )
217
+ # This is the user-input entry at the bottom.
218
+ @entry_for_the_remote_query = gtk_entry
219
+ @entry_for_the_remote_query.center
220
+ @entry_for_the_remote_query.on_key_press_event { |widget, event|
221
+ case Gdk::Keyval.to_name(event.keyval)
222
+ when 'Return', 'KP_Enter'
223
+ do_perform_a_remote_query_to_the_leo_dictionary
224
+ end
225
+ }
226
+ bottom_vbox.minimal(
227
+ @entry_for_the_remote_query
228
+ )
229
+ button_for_the_remote_query = gtk_button(
230
+ 'Query from a remote dictionary'
231
+ )
232
+ button_for_the_remote_query.fancy_tooltips =
233
+ 'This will <b>query the remote dictionary</b> at leo instead. '\
234
+ 'The <b>advantage</b> here is that the dataset at leo will '\
235
+ 'contain many more entries than does the knowledgebase '\
236
+ 'distributed with the <b>dictionaries gem</b>.'
237
+ button_for_the_remote_query.on_clicked {
238
+ do_perform_a_remote_query_to_the_leo_dictionary
239
+ }
240
+ @entry_at_the_bottom_showing_the_result_from_online_leo = gtk_entry
241
+ @entry_at_the_bottom_showing_the_result_from_online_leo.center
242
+ bottom_vbox.minimal(
243
+ @entry_at_the_bottom_showing_the_result_from_online_leo
244
+ )
245
+ bottom_vbox.minimal(
246
+ button_for_the_remote_query
247
+ )
248
+ maximal(bottom_vbox)
249
+ end
250
+
251
+ # ========================================================================= #
252
+ # === connect_skeleton (skeleton tag, connect tag)
253
+ # ========================================================================= #
254
+ def connect_skeleton
255
+ minimal(@answer_field) # ← Translation appears here.
256
+ add_ask_the_question_button
257
+ add_the_widget_for_remote_query_of_the_dictionary_at_leo
258
+ add_the_statistics_frame
259
+ end
260
+
261
+ # ========================================================================= #
262
+ # === add_the_statistics_frame
263
+ # ========================================================================= #
264
+ def add_the_statistics_frame
265
+ maximal(@frame_statistics, 2)
266
+ end
267
+
268
+ # ========================================================================= #
269
+ # === update_the_statistics_frame (update tag)
270
+ # ========================================================================= #
271
+ def update_the_statistics_frame(i = return_currently_selected_file)
272
+ @label_currently_selected_file.set_text(i)
273
+ end
274
+
275
+ # ========================================================================= #
276
+ # === do_perform_a_remote_query_to_the_leo_dictionary
277
+ # ========================================================================= #
278
+ def do_perform_a_remote_query_to_the_leo_dictionary(
279
+ i = @entry_for_the_remote_query.text.to_s
280
+ )
281
+ if i and !i.empty?
282
+ array = ::Dictionaries.return_array_of_translated_words_from_online_leo(i)
283
+ result = array.first
284
+ @entry_at_the_bottom_showing_the_result_from_online_leo.set_text(result)
285
+ end
286
+ end
287
+
288
+ # ========================================================================= #
289
+ # === create_the_statistics_frame
290
+ # ========================================================================= #
291
+ def create_the_statistics_frame
292
+ @frame_statistics = gtk_frame(' Statistics ')
293
+ @frame_statistics.make_bold
294
+ vbox = gtk_vbox
295
+ @label_currently_selected_file = gtk_label(return_currently_selected_file)
296
+ vbox.minimal(
297
+ @label_currently_selected_file, 0
298
+ )
299
+ @frame_statistics.add(vbox)
300
+ end
301
+
302
+ # ========================================================================= #
303
+ # === return_currently_selected_file
304
+ # ========================================================================= #
305
+ def return_currently_selected_file
306
+ 'Currently selected file: '+
307
+ File.basename(
308
+ @dictionaries.currently_selected_file?.to_s
309
+ )
310
+ end
311
+
312
+ # ========================================================================= #
313
+ # === create_skeleton
314
+ # ========================================================================= #
315
+ def create_skeleton
316
+ create_input_field_on_top
317
+ create_answer_field
318
+ create_the_statistics_frame
319
+ end
320
+
321
+ # ========================================================================= #
322
+ # === run
323
+ # ========================================================================= #
324
+ def run
325
+ create_skeleton
326
+ connect_skeleton
327
+ update_the_statistics_frame
328
+ show_all
329
+ end
330
+
331
+ # ========================================================================= #
332
+ # === Dictionaries::GUI::Gtk::Dictionary.run
333
+ #
334
+ # Use this method if you wish to start a new gtk-application window.
335
+ # ========================================================================= #
336
+ def self.run
337
+ require 'gtk_paradise/run'
338
+ _ = Dictionaries::GUI::Gtk::Dictionary.new
339
+ r = ::Gtk.run
340
+ r << _
341
+ r.set_size_request(
342
+ _.width?,
343
+ _.height?
344
+ )
345
+ r.border_width = 12
346
+ r.top_left_then_run
347
+ end
348
+
349
+ end; end; end
350
+
351
+ # =========================================================================== #
352
+ # === Dictionaries.gtk_widget
353
+ #
354
+ # This toplevel-method can be used to return the gtk-widget, which
355
+ # can then be embedded by other ruby-gtk applications, in particular
356
+ # admin_panel.rb of the gtk_paradise project.
357
+ # =========================================================================== #
358
+ def self.gtk_widget
359
+ Dictionaries::GUI::Gtk::Dictionary.new
360
+ end
361
+
362
+ end
@@ -0,0 +1,2 @@
1
+ This directory includes experimental tk code. The main GUI is
2
+ ruby-gtk, so this is just a fallback.
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Dictionaries::GUI::Tk::Dictionary
6
+ #
7
+ # This is a small TK-wrapper.
8
+ # =========================================================================== #
9
+ # require 'dictionaries/gui/tk/dictionary.rb'
10
+ # =========================================================================== #
11
+ begin
12
+ require 'tk'
13
+ rescue LoadError; end
14
+ require 'dictionaries/class/ask_word_from_dictionary.rb'
15
+ require 'dictionaries/toplevel_methods/e.rb'
16
+
17
+ module Dictionaries
18
+
19
+ module GUI
20
+
21
+ module Tk
22
+
23
+ class Dictionary < ::TkFrame # < Base === Dictionaries::GUI::Tk::Dictionary.new
24
+
25
+ include Colours::E
26
+
27
+ # ========================================================================= #
28
+ # === initialize
29
+ # ========================================================================= #
30
+ def initialize(
31
+ i = nil,
32
+ run_already = true
33
+ )
34
+ super()
35
+ reset
36
+ set_input(i)
37
+ title "TK wrapper for the Dictionaries project"
38
+ run if run_already
39
+ end
40
+
41
+ # ========================================================================= #
42
+ # === reset (reset tag)
43
+ # ========================================================================= #
44
+ def reset
45
+ end
46
+
47
+ # ========================================================================= #
48
+ # === set_input
49
+ # ========================================================================= #
50
+ def set_input(i = '')
51
+ i = i.first if i.is_a? Array
52
+ i = i.to_s.dup
53
+ @input = i
54
+ end
55
+
56
+ # ========================================================================= #
57
+ # === input?
58
+ # ========================================================================= #
59
+ def input?
60
+ @input
61
+ end
62
+
63
+ # ========================================================================= #
64
+ # === run (run tag)
65
+ # ========================================================================= #
66
+ def run
67
+ TkLabel.new(root) do
68
+ text 'Hello, World!'
69
+ pack { padx 15 ; pady 15; side 'left' }
70
+ end
71
+ end
72
+
73
+ # ========================================================================= #
74
+ # === Dictionaries::GUI:Tk::Dictionary[]
75
+ # ========================================================================= #
76
+ def self.[](i = '')
77
+ self.new(i)
78
+ end
79
+
80
+ end; end; end; end
81
+
82
+ if __FILE__ == $PROGRAM_NAME
83
+ Dictionaries::GUI:Tk::Dictionary.new(ARGV)
84
+ ::Tk.mainloop
85
+ end # dictionary.rb
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'dictionaries/project/project_base_directory.rb'
6
+ # =========================================================================== #
7
+ module Dictionaries
8
+
9
+ # ========================================================================= #
10
+ # === Dictionaries::PROJECT_BASE_DIRECTORY
11
+ # ========================================================================= #
12
+ PROJECT_BASE_DIRECTORY =
13
+ File.absolute_path("#{__dir__}/..")+'/'
14
+
15
+ # ========================================================================= #
16
+ # === Dictionaries.project_base_dir?
17
+ # ========================================================================= #
18
+ def self.project_base_dir?
19
+ PROJECT_BASE_DIRECTORY
20
+ end
21
+
22
+ end
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # This file will point to the yaml directory of the Dictionaries project.
6
+ # =========================================================================== #
7
+ # require 'dictionaries/project/project_yaml_directory.rb'
8
+ # =========================================================================== #
9
+ require 'dictionaries/project/project_base_directory.rb'
10
+
11
+ module Dictionaries
12
+
13
+ # ========================================================================= #
14
+ # === PROJECT_YAML_DIRECTORY
15
+ # ========================================================================= #
16
+ PROJECT_YAML_DIRECTORY = "#{PROJECT_BASE_DIRECTORY}yaml/"
17
+
18
+ # ========================================================================= #
19
+ # === Dictionaries.project_yaml_dir?
20
+ # ========================================================================= #
21
+ def self.project_yaml_dir?
22
+ PROJECT_YAML_DIRECTORY
23
+ end; self.instance_eval { alias dictionary_directory? project_yaml_dir? } # === Dictionaries.dictionary_directory?
24
+
25
+ end
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'dictionaries/require_project/require_project.rb'
6
+ # =========================================================================== #
7
+ require 'dictionaries/ask_italian_word.rb'
8
+ require 'dictionaries/toplevel_methods/has_key.rb' # This file requires the files above.
9
+ require 'dictionaries/toplevel_methods/module_methods.rb'
10
+ require 'dictionaries/toplevel_methods/english_to_german.rb'
11
+ require 'dictionaries/toplevel_methods/is_on_roebe.rb'
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Dictionaries::Sinatra
6
+ # =========================================================================== #
7
+ # require 'dictionaries/sinatra/app.rb'
8
+ # =========================================================================== #
9
+ require 'sinatra/base.rb'
10
+
11
+ module Dictionaries
12
+
13
+ class Sinatra < ::Sinatra::Base
14
+
15
+ require 'dictionaries/class/ask_word_from_dictionary.rb'
16
+ require 'dictionaries/toplevel_methods/is_on_roebe.rb'
17
+ require 'dictionaries/sinatra/english_to_german.rb'
18
+
19
+ include Colours
20
+ include Colours::E
21
+ begin
22
+ require 'html_tags'
23
+ include HtmlTags::BaseModule
24
+ rescue LoadError; end
25
+
26
+ # ========================================================================= #
27
+ # === USE_THIS_PORT
28
+ # ========================================================================= #
29
+ USE_THIS_PORT = '5252'
30
+
31
+ set :port, USE_THIS_PORT
32
+
33
+ # ========================================================================= #
34
+ # === initialize
35
+ # ========================================================================= #
36
+ def initialize
37
+ super()
38
+ reset
39
+ consider_opening_the_page_in_the_browser
40
+ end
41
+
42
+ # ========================================================================= #
43
+ # === reset
44
+ # ========================================================================= #
45
+ def reset
46
+ end
47
+
48
+ # ========================================================================= #
49
+ # === consider_opening_the_page_in_the_browser
50
+ # ========================================================================= #
51
+ def consider_opening_the_page_in_the_browser
52
+ if ::Dictionaries.is_on_roebe?
53
+ begin
54
+ require 'open'
55
+ rescue LoadError; end
56
+ # ===================================================================== #
57
+ # Tell us which port will be used:
58
+ # ===================================================================== #
59
+ target = "http://localhost:#{USE_THIS_PORT}/"
60
+ e sfancy(target)
61
+ Thread.new {
62
+ sleep 1.0
63
+ Open.in_browser(target)
64
+ }
65
+ end
66
+ end
67
+
68
+ # ========================================================================= #
69
+ # === / Entry point
70
+ #
71
+ # This is the root of our web-application.
72
+ # ========================================================================= #
73
+ get('/'){
74
+ html_header_default_title_and_start_of_the_body_tag+
75
+ p('Available translations:')+
76
+ a('/english_to_german')+
77
+ br+
78
+ a('/german_to_english')+
79
+ br
80
+ }
81
+
82
+ # ========================================================================= #
83
+ # === not_found
84
+ # ========================================================================= #
85
+ not_found {
86
+ p('This particular <b>API</b> was not found.')
87
+ }
88
+
89
+ end
90
+
91
+ # =========================================================================== #
92
+ # === Dictionaries.start_sinatra_interface
93
+ #
94
+ # This method can be used to start the sinatra interface.
95
+ # =========================================================================== #
96
+ def self.start_sinatra_interface
97
+ e 'Trying to start the sinatra-interface of the Dictionaries project.'
98
+ ::Dictionaries::Sinatra.run!
99
+ end
100
+
101
+ end
102
+
103
+ if __FILE__ == $PROGRAM_NAME
104
+ Dictionaries.start_sinatra_interface
105
+ end # dictionaries --sinatra