Class: Jiralicious::CustomFieldOption

Inherits:
Base
  • Object
show all
Defined in:
lib/jiralicious/custom_field_option.rb

Instance Attribute Summary

Attributes inherited from Base

#loaded

Class Method Summary collapse

Instance Method Summary collapse

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

#parse!

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_nameObject



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, options = {})
  response = fetch({:key => id})
  response.parsed_response['id'] = id
  new(response.parsed_response)
end