mirror of
https://github.com/dkhamsing/open-source-ios-apps.git
synced 2024-11-23 21:34:39 +03:00
11 lines
172 B
Ruby
11 lines
172 B
Ruby
require 'json'
|
|
|
|
FILE = 'contents.json'
|
|
|
|
def get_json
|
|
JSON.parse(File.read FILE)
|
|
end
|
|
|
|
def osia_allowed_categories(c)
|
|
c.sort_by { |h| h['title']}.map { |x| x['id']}
|
|
end |