Module: FogExtensions::Model::InstanceMethods
- Defined in:
- lib/fog_extensions/model.rb
Instance Method Summary collapse
Instance Method Details
#as_json(options = { }) ⇒ Object
20 21 22 23 24 |
# File 'lib/fog_extensions/model.rb', line 20 def as_json( = { }) attr = attributes.dup attr.delete(:client) attr end |
#persisted? ⇒ Boolean
12 13 14 |
# File 'lib/fog_extensions/model.rb', line 12 def persisted? !!identity end |
#to_json(options = { }) ⇒ Object
16 17 18 |
# File 'lib/fog_extensions/model.rb', line 16 def to_json(={ }) ActiveSupport::JSON.encode(self, ) end |