ci_power 0.0.22 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ci_power/export.rb +8 -2
- data/lib/ci_power/version.rb +1 -1
- metadata +1 -1
data/lib/ci_power/export.rb
CHANGED
@@ -27,11 +27,17 @@ module CiPower
|
|
27
27
|
attr :date_format, true
|
28
28
|
|
29
29
|
##
|
30
|
-
# Returns the all added records
|
30
|
+
# Returns the all added records or an empty array. To add records to the
|
31
31
|
# output use the method export_customer.
|
32
32
|
def output
|
33
33
|
@output ||= []
|
34
|
-
|
34
|
+
end
|
35
|
+
|
36
|
+
##
|
37
|
+
# Returns the all added records sorted by group number and record type or an empty array.
|
38
|
+
|
39
|
+
def ordered_output
|
40
|
+
output.sort { |rec1, rec2| "#{rec1.group_no}#{rec1.record_type}".to_i <=> "#{rec2.group_no}#{rec2.record_type}".to_i }
|
35
41
|
end
|
36
42
|
|
37
43
|
##
|
data/lib/ci_power/version.rb
CHANGED