Class: StackOne::Models::Shared::Note

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Includes:
Crystalline::MetadataFields
Defined in:
lib/stack_one/models/shared/note.rb

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(author_id: nil, content: nil, created_at: nil, deleted_at: nil, id: nil, remote_author_id: nil, remote_id: nil, unified_custom_fields: nil, updated_at: nil, visibility: nil) ⇒ Note

Returns a new instance of Note.



37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/stack_one/models/shared/note.rb', line 37

def initialize(author_id: nil, content: nil, created_at: nil, deleted_at: nil, id: nil, remote_author_id: nil, remote_id: nil, unified_custom_fields: nil, updated_at: nil, visibility: nil)
  @author_id = author_id
  @content = content
  @created_at = created_at
  @deleted_at = deleted_at
  @id = id
  @remote_author_id = remote_author_id
  @remote_id = remote_id
  @unified_custom_fields = unified_custom_fields
  @updated_at = updated_at
  @visibility = visibility
end

Instance Method Details

#==(other) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/stack_one/models/shared/note.rb', line 51

def ==(other)
  return false unless other.is_a? self.class
  return false unless @author_id == other.author_id
  return false unless @content == other.content
  return false unless @created_at == other.created_at
  return false unless @deleted_at == other.deleted_at
  return false unless @id == other.id
  return false unless @remote_author_id == other.remote_author_id
  return false unless @remote_id == other.remote_id
  return false unless @unified_custom_fields == other.unified_custom_fields
  return false unless @updated_at == other.updated_at
  return false unless @visibility == other.visibility
  true
end