open-source-ios-apps/.github/osia_helper.rb

11 lines
172 B
Ruby
Raw Normal View History

2016-05-16 20:29:04 +03:00
require 'json'
FILE = 'contents.json'
def get_json
JSON.parse(File.read FILE)
end
2016-05-19 05:13:25 +03:00
def osia_allowed_categories(c)
c.sort_by { |h| h['title']}.map { |x| x['id']}
end