Sha256: 024b765ba83db72ecafda39dccafdc1c41a6922c950015f444f8d058a6c69002
Contents?: true
Size: 841 Bytes
Versions: 1
Compression:
Stored size: 841 Bytes
Contents
module Attune module Model # class AnonymousResult attr_accessor :id # :internal => :external def self.attribute_map { :id => :id } end def initialize(attributes = {}) return if attributes.empty? # Morph attribute keys into undescored rubyish style if self.class.attribute_map[:"id"] # Workaround since JSON.parse has accessors as strings rather than symbols @id = attributes["id"] || attributes[:"id"] end end def to_body body = {} self.class.attribute_map.each_pair do |key, value| body[value] = self.send(key) unless self.send(key).nil? end body end def to_json(options = {}) to_body.to_json end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
attune-1.0.5 | lib/attune/models/anonymousresult.rb |