Class: Todoist::Label

Inherits:
Struct
  • Object
show all
Includes:
StructCleanup
Defined in:
lib/todoist/label.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) ⇒ Label

Returns a new instance of Label.



14
15
16
17
18
19
# File 'lib/todoist/label.rb', line 14

def initialize(*arg_hashes)
  args = arg_hashes.first
  ignore_undefined_keys(args)
  replace_keys(args, {item_order: :order})
  super
end

Instance Attribute Details

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



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

def color
  @color
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



2
3
4
# File 'lib/todoist/label.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/label.rb', line 2

def is_deleted
  @is_deleted
end

#is_favoriteObject

Returns the value of attribute is_favorite

Returns:

  • (Object)

    the current value of is_favorite



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

def is_favorite
  @is_favorite
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/label.rb', line 2

def jsw_ignored_keys
  @jsw_ignored_keys
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



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

def name
  @name
end

#orderObject

Returns the value of attribute order

Returns:

  • (Object)

    the current value of order



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

def order
  @order
end

Instance Method Details

#deleted?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'lib/todoist/label.rb', line 21

def deleted?
  is_deleted.present?
end

#favorite?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/todoist/label.rb', line 25

def favorite?
  is_favorite.present?
end