Class: Todoist::Comment

Inherits:
Struct
  • Object
show all
Includes:
StructCleanup
Defined in:
lib/todoist/comment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from StructCleanup

#fields_to_date_time, #ignore_undefined_keys, #properties_to_desc, #replace_keys

Constructor Details

#initialize(*arg_hashes) ⇒ Comment

Returns a new instance of Comment.



18
19
20
21
22
23
# File 'lib/todoist/comment.rb', line 18

def initialize(*arg_hashes)
  args = arg_hashes.first
  fields_to_date_time(args, %w[posted_at])
  ignore_undefined_keys(args)
  super
end

Instance Attribute Details

#contentObject

Returns the value of attribute content

Returns:

  • (Object)

    the current value of content



2
3
4
# File 'lib/todoist/comment.rb', line 2

def content
  @content
end

#file_attachmentObject

Returns the value of attribute file_attachment

Returns:

  • (Object)

    the current value of file_attachment



2
3
4
# File 'lib/todoist/comment.rb', line 2

def file_attachment
  @file_attachment
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



2
3
4
# File 'lib/todoist/comment.rb', line 2

def id
  @id
end

#is_deletedObject

Returns the value of attribute is_deleted

Returns:

  • (Object)

    the current value of is_deleted



2
3
4
# File 'lib/todoist/comment.rb', line 2

def is_deleted
  @is_deleted
end

#item_idObject Also known as: task_id

Returns the value of attribute item_id

Returns:

  • (Object)

    the current value of item_id



2
3
4
# File 'lib/todoist/comment.rb', line 2

def item_id
  @item_id
end

#jsw_ignored_keysObject

Returns the value of attribute jsw_ignored_keys

Returns:

  • (Object)

    the current value of jsw_ignored_keys



2
3
4
# File 'lib/todoist/comment.rb', line 2

def jsw_ignored_keys
  @jsw_ignored_keys
end

#posted_atObject

Returns the value of attribute posted_at

Returns:

  • (Object)

    the current value of posted_at



2
3
4
# File 'lib/todoist/comment.rb', line 2

def posted_at
  @posted_at
end

#posted_uidObject

Returns the value of attribute posted_uid

Returns:

  • (Object)

    the current value of posted_uid



2
3
4
# File 'lib/todoist/comment.rb', line 2

def posted_uid
  @posted_uid
end

#project_idObject

Returns the value of attribute project_id

Returns:

  • (Object)

    the current value of project_id



2
3
4
# File 'lib/todoist/comment.rb', line 2

def project_id
  @project_id
end

#reactionsObject

Returns the value of attribute reactions

Returns:

  • (Object)

    the current value of reactions



2
3
4
# File 'lib/todoist/comment.rb', line 2

def reactions
  @reactions
end

#uids_to_notifyObject

Returns the value of attribute uids_to_notify

Returns:

  • (Object)

    the current value of uids_to_notify



2
3
4
# File 'lib/todoist/comment.rb', line 2

def uids_to_notify
  @uids_to_notify
end

Instance Method Details

#deleted?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/todoist/comment.rb', line 31

def deleted?
  is_deleted.present?
end

#file_attachment?Boolean Also known as: attachment?

Returns:

  • (Boolean)


27
28
29
# File 'lib/todoist/comment.rb', line 27

def file_attachment?
  file_attachment.blank?
end