Class: Trello::CheckItemState

Inherits:
BasicData show all
Defined in:
lib/trello/item_state.rb

Overview

Represents the state of an item.

Instance Attribute Summary collapse

Attributes inherited from BasicData

#client

Instance Method Summary collapse

Methods inherited from BasicData

#==, #attributes, client, #collection_name, #collection_path, create, #element_name, #element_path, find, #hash, #initialize, many, one, parse, parse_many, path_name, #refresh!, register_attrs, #save, save, schema, #schema, #update!, #update_fields

Methods included from JsonUtils

included

Constructor Details

This class inherits a constructor from Trello::BasicData

Instance Attribute Details

#idString (readonly)

Returns:



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/trello/item_state.rb', line 8

class CheckItemState < BasicData
  schema do
    #Readonly
    attribute :id, remote_key: 'idCheckItem', readonly: true, primary_key: true
    attribute :state
  end

  validates_presence_of :id

  # Return the item this state belongs to.
  def item
    Item.find(id)
  end
end

#stateObject (readonly)

Returns:

  • (Object)


8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/trello/item_state.rb', line 8

class CheckItemState < BasicData
  schema do
    #Readonly
    attribute :id, remote_key: 'idCheckItem', readonly: true, primary_key: true
    attribute :state
  end

  validates_presence_of :id

  # Return the item this state belongs to.
  def item
    Item.find(id)
  end
end

Instance Method Details

#itemObject

Return the item this state belongs to.



18
19
20
# File 'lib/trello/item_state.rb', line 18

def item
  Item.find(id)
end