Class: Trello::CheckItemState
- Defined in:
- lib/trello/item_state.rb
Overview
Represents the state of an item.
Instance Attribute Summary collapse
- #id ⇒ String readonly
- #state ⇒ Object readonly
Attributes inherited from BasicData
Instance Method Summary collapse
-
#item ⇒ Object
Return the item this state belongs to.
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
Constructor Details
This class inherits a constructor from Trello::BasicData
Instance Attribute Details
#id ⇒ String (readonly)
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 |
#state ⇒ Object (readonly)
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 |