class ActiveJSON::Base
Public Class Methods
extension()
click to toggle source
# File lib/active_json/base.rb, line 13 def extension "json" end
load_file()
click to toggle source
# File lib/active_json/base.rb, line 5 def load_file if (data = raw_data).is_a?(Array) data elsif data.respond_to?(:values) data.values end end
Private Class Methods
load_path(path)
click to toggle source
# File lib/active_json/base.rb, line 18 def load_path(path) JSON.load(File.open(path, 'r:bom|utf-8')) end