Class: Smartdict::Gui::Controller::Config

Inherits:
Object
  • Object
show all
Includes:
Models
Defined in:
lib/smartdict/gui/controller/config.rb

Instance Method Summary collapse

Instance Method Details

#from_langObject



12
13
14
# File 'lib/smartdict/gui/controller/config.rb', line 12

def from_lang
  @from_lang ||= configatron.default.from_lang
end

#lang_namesObject



4
5
6
# File 'lib/smartdict/gui/controller/config.rb', line 4

def lang_names
  @lang_names ||= langs.map{|code| Language[code].name }
end

#langsObject



8
9
10
# File 'lib/smartdict/gui/controller/config.rb', line 8

def langs
  @langs ||= (configatron.default.langs + [from_lang, to_lang]).uniq
end

#to_langObject



16
17
18
# File 'lib/smartdict/gui/controller/config.rb', line 16

def to_lang
  @to_lang ||= configatron.default.to_lang
end