Method: Clouder::Entity#initialize

Defined in:
lib/clouder/entity.rb

#initialize(attributes = {}) ⇒ Entity

Constructs a new, unsaved object. If attributes are passed in a hash the new object is initialized with the corresponding attributes and values.

note = Note.new # => new, empty
note = Note.new(:text => "Ready note", :author => "Myself") # => new, with attributes set


144
145
146
147
# File 'lib/clouder/entity.rb', line 144

def initialize(attributes = {})
  @id, @etag, @last_modified, @deleted = nil
  build(attributes)
end