Class: Dhis2::Versioned
- Inherits:
-
Object
show all
- Defined in:
- lib/dhis2/classes.rb
Direct Known Subclasses
Analytic, Attribute, Category, CategoryCombo, CategoryOption, CategoryOptionCombo, DataElement, DataElementGroup, DataSet, DataValueSet, Event, Indicator, IndicatorGroup, IndicatorType, LegendSet, OrganisationUnit, OrganisationUnitGroup, OrganisationUnitGroupSet, OrganisationUnitLevel, Program, Report, ReportTable, ResourceTable, SystemInfo, User
Constant Summary
collapse
- MAPPING =
{
"2.24" => "Version224",
"2.25" => "Version225",
"2.26" => "Version226",
"2.27" => "Version227",
"2.28" => "Version228"
}.freeze
Class Method Summary
collapse
Class Method Details
.[](version) ⇒ Object
13
14
15
|
# File 'lib/dhis2/classes.rb', line 13
def self.[](version)
Object.const_get "Dhis2::Api::#{MAPPING[version]}::#{basename}"
end
|
.basename ⇒ Object
17
18
19
|
# File 'lib/dhis2/classes.rb', line 17
def self.basename
name.split("::").last
end
|