module StructToJSON
Public Class Methods
included(base)
click to toggle source
# File lib/ext/struct.rb, line 9 def self.included(base) base.instance_eval do alias_method :to_s, :to_json end end
Public Instance Methods
to_json()
click to toggle source
# File lib/ext/struct.rb, line 5 def to_json to_h.to_json end