Class: AOJ::Language
- Inherits:
-
Object
- Object
- AOJ::Language
- Defined in:
- lib/aoj/language.rb
Class Attribute Summary collapse
-
.extnames ⇒ Object
readonly
Returns the value of attribute extnames.
-
.languages ⇒ Object
readonly
Returns the value of attribute languages.
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#submit_name ⇒ Object
Returns the value of attribute submit_name.
Class Method Summary collapse
Class Attribute Details
.extnames ⇒ Object (readonly)
Returns the value of attribute extnames.
46 47 48 |
# File 'lib/aoj/language.rb', line 46 def extnames @extnames end |
.languages ⇒ Object (readonly)
Returns the value of attribute languages.
46 47 48 |
# File 'lib/aoj/language.rb', line 46 def languages @languages end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/aoj/language.rb', line 3 def key @key end |
#submit_name ⇒ Object
Returns the value of attribute submit_name.
3 4 5 |
# File 'lib/aoj/language.rb', line 3 def submit_name @submit_name end |
Class Method Details
.find(key) ⇒ Object
48 49 50 |
# File 'lib/aoj/language.rb', line 48 def find(key) languages.find { |l| l.key == key } end |
.find_by_ext(ext) ⇒ Object
52 53 54 |
# File 'lib/aoj/language.rb', line 52 def find_by_ext(ext) languages.find { |l| l.key == extnames[ext] } end |