Class: GeoPattern::PatternStore
- Inherits:
-
Object
- Object
- GeoPattern::PatternStore
- Defined in:
- lib/geo_pattern/pattern_store.rb
Overview
rubocop:enable Naming/ConstantName
Instance Method Summary collapse
- #[](pattern) ⇒ Object
- #all ⇒ Object
-
#initialize ⇒ PatternStore
constructor
A new instance of PatternStore.
- #known?(pattern) ⇒ Boolean
Constructor Details
#initialize ⇒ PatternStore
Returns a new instance of PatternStore.
Instance Method Details
#[](pattern) ⇒ Object
51 52 53 54 55 |
# File 'lib/geo_pattern/pattern_store.rb', line 51 def [](pattern) warn "String pattern references are deprecated as of 1.3.0" if pattern.is_a?(String) store[pattern.to_s.to_sym] end |
#all ⇒ Object
57 58 59 |
# File 'lib/geo_pattern/pattern_store.rb', line 57 def all store.values end |
#known?(pattern) ⇒ Boolean
61 62 63 |
# File 'lib/geo_pattern/pattern_store.rb', line 61 def known?(pattern) store.key?(pattern.to_s.to_sym) end |