Class: Moloni::Language
Constant Summary
Constants inherited
from BaseModel
BaseModel::COMMON_ACRONYMS, BaseModel::ERROR_MESSAGES
Class Method Summary
collapse
Methods inherited from BaseModel
all, composed_params, count, create, delete, format_url, #format_url, method_missing, post, respond_to_missing?
Class Method Details
.en ⇒ Object
13
14
15
|
# File 'lib/moloni/models/language.rb', line 13
def self.en
find('en')
end
|
.es ⇒ Object
17
18
19
|
# File 'lib/moloni/models/language.rb', line 17
def self.es
find('es')
end
|
.find(code) ⇒ Object
21
22
23
|
# File 'lib/moloni/models/language.rb', line 21
def self.find(code)
post('getAll/').select { |el| el[:code].match?(/#{code}/i) }.first
end
|
.pt ⇒ Object
9
10
11
|
# File 'lib/moloni/models/language.rb', line 9
def self.pt
find('pt')
end
|