module Locomotive::Steam::Models::Concerns::ToJson
Public Instance Methods
as_json(options = nil)
click to toggle source
# File lib/locomotive/steam/models/concerns/to_json.rb, line 18 def as_json(options = nil) to_hash.as_json(options) end
to_hash()
click to toggle source
# File lib/locomotive/steam/models/concerns/to_json.rb, line 8 def to_hash {}.tap do |_attributes| attributes.each do |key, value| next if value && value.respond_to?(:repository) # skip associations _attributes[key.to_s] = value end end end
to_json()
click to toggle source
# File lib/locomotive/steam/models/concerns/to_json.rb, line 22 def to_json as_json.to_json end