module JSONable
Public Class Methods
included(base)
click to toggle source
# File lib/ebsco/eds/jsonable.rb, line 13 def self.included(base) base.extend(ClassMethods) end
Public Instance Methods
as_json()
click to toggle source
# File lib/ebsco/eds/jsonable.rb, line 17 def as_json serialized = Hash.new self.class.attributes.each do |attribute| serialized[attribute] = self.public_send attribute end serialized end
to_json(*a)
click to toggle source
# File lib/ebsco/eds/jsonable.rb, line 25 def to_json(*a) as_json.to_json(*a) end