Class: EY::Collection::Abstract
- Defined in:
- lib/engineyard/collection/abstract.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.ambiguous_error ⇒ Object
Returns the value of attribute ambiguous_error.
-
.invalid_error ⇒ Object
Returns the value of attribute invalid_error.
Instance Method Summary collapse
Class Attribute Details
.ambiguous_error ⇒ Object
Returns the value of attribute ambiguous_error.
30 31 32 |
# File 'lib/engineyard/collection/abstract.rb', line 30 def ambiguous_error @ambiguous_error end |
.invalid_error ⇒ Object
Returns the value of attribute invalid_error.
30 31 32 |
# File 'lib/engineyard/collection/abstract.rb', line 30 def invalid_error @invalid_error end |
Instance Method Details
#match_one(name_part) ⇒ Object
11 12 13 |
# File 'lib/engineyard/collection/abstract.rb', line 11 def match_one(name_part) named(name_part) || find_by_unambiguous_substring(name_part) end |
#match_one!(name_part) ⇒ Object
15 16 17 |
# File 'lib/engineyard/collection/abstract.rb', line 15 def match_one!(name_part) match_one(name_part) or raise invalid_error(name_part) end |
#named(name) ⇒ Object
7 8 9 |
# File 'lib/engineyard/collection/abstract.rb', line 7 def named(name) find {|x| x.name == name } end |