Class: Jiralicious::CustomFieldOption
- Defined in:
- lib/jiralicious/custom_field_option.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(decoded_json, default = nil, &blk) ⇒ CustomFieldOption
constructor
A new instance of CustomFieldOption.
Methods inherited from Base
#all, #endpoint_name, fetch, find_all, handler, #loaded?, #method_missing, #numeric?, #parent_name, parent_name, #properties_from_hash, #reload
Methods included from Parsers::FieldParser
Constructor Details
#initialize(decoded_json, default = nil, &blk) ⇒ CustomFieldOption
Returns a new instance of CustomFieldOption.
5 6 7 8 9 10 11 12 13 |
# File 'lib/jiralicious/custom_field_option.rb', line 5 def initialize(decoded_json, default = nil, &blk) @loaded = false if decoded_json.is_a? Hash properties_from_hash(decoded_json) super(decoded_json) parse!(decoded_json) @loaded = true end end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Jiralicious::Base
Class Method Details
.endpoint_name ⇒ Object
16 17 18 |
# File 'lib/jiralicious/custom_field_option.rb', line 16 def endpoint_name "customFieldOption" end |
.find(id, options = {}) ⇒ Object
20 21 22 23 24 |
# File 'lib/jiralicious/custom_field_option.rb', line 20 def find(id, = {}) response = fetch({:key => id}) response.parsed_response['id'] = id new(response.parsed_response) end |