Class: TranslationTable
- Inherits:
-
Object
- Object
- TranslationTable
- Defined in:
- lib/ccls_engine/translation_table.rb
Class Method Summary collapse
- .[](key = nil) ⇒ Object
-
.selector_options ⇒ Object
[[‘Yes’,1],,[“Don’t Know”,999]].
-
.valid_values ⇒ Object
[1,2,999].
Class Method Details
.[](key = nil) ⇒ Object
3 4 5 |
# File 'lib/ccls_engine/translation_table.rb', line 3 def self.[](key=nil) short(key) || value(key) || nil end |
.selector_options ⇒ Object
- [‘Yes’,1],,[“Don’t Know”,999]
17 18 19 20 |
# File 'lib/ccls_engine/translation_table.rb', line 17 def self. # @@selector_options ||= table.collect{|x| [x[:long],x[:value]] } table.collect{|x| [x[:long],x[:value]] } end |
.valid_values ⇒ Object
- 1,2,999
11 12 13 14 |
# File 'lib/ccls_engine/translation_table.rb', line 11 def self.valid_values # @@valid_values ||= table.collect{ |x| x[:value] } table.collect{ |x| x[:value] } end |