Class: Trello::CustomField
- Inherits:
-
Object
- Object
- Trello::CustomField
- Defined in:
- lib/trello-lite/custom_field.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
- #delete ⇒ Object
- #id ⇒ Object
-
#initialize(attrs = {}) ⇒ CustomField
constructor
A new instance of CustomField.
- #name ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(attrs = {}) ⇒ CustomField
Returns a new instance of CustomField.
5 6 7 |
# File 'lib/trello-lite/custom_field.rb', line 5 def initialize(attrs = {}) @attributes = attrs end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
3 4 5 |
# File 'lib/trello-lite/custom_field.rb', line 3 def attributes @attributes end |
Instance Method Details
#delete ⇒ Object
21 22 23 24 25 |
# File 'lib/trello-lite/custom_field.rb', line 21 def delete url = "https://api.trello.com/1/customfields/#{id}?" + Trello.credentials response = HTTParty.delete(url, format: :plain) JSON.parse(response, symbolize_names: true) end |
#id ⇒ Object
9 10 11 |
# File 'lib/trello-lite/custom_field.rb', line 9 def id attributes[:id] end |
#name ⇒ Object
17 18 19 |
# File 'lib/trello-lite/custom_field.rb', line 17 def name attributes[:name] end |
#type ⇒ Object
13 14 15 |
# File 'lib/trello-lite/custom_field.rb', line 13 def type attributes[:type] end |