Class: PipeLineDealer::CustomField::Collection
- Inherits:
-
PipeLineDealer::Collection
- Object
- PipeLineDealer::Collection
- PipeLineDealer::CustomField::Collection
- Defined in:
- lib/pipe_line_dealer/custom_field/collection.rb
Constant Summary
Constants inherited from PipeLineDealer::Collection
PipeLineDealer::Collection::DEFAULT_OPTIONS
Instance Attribute Summary
Attributes inherited from PipeLineDealer::Collection
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(client, options = {}) ⇒ Collection
constructor
A new instance of Collection.
Methods inherited from PipeLineDealer::Collection
Methods included from PipeLineDealer::Collection::Concerns::CreateAndUpdate
Methods included from PipeLineDealer::Collection::Concerns::Fetching
#all, #each, #find, #first, #limit, #on_new_defaults, #to_a, #where
Constructor Details
#initialize(client, options = {}) ⇒ Collection
Returns a new instance of Collection.
4 5 6 7 |
# File 'lib/pipe_line_dealer/custom_field/collection.rb', line 4 def initialize(client, ={}) [:cached] = true super(client, ) end |
Instance Method Details
#[](key) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/pipe_line_dealer/custom_field/collection.rb', line 9 def [](key) self.all.each do |item| return item if item.name== key end raise PipeLineDealer::Error::NoSuchCustomField.new(key) end |