Class: Fusuma::Config::Index
- Inherits:
-
Object
- Object
- Fusuma::Config::Index
- Defined in:
- lib/fusuma/config/index.rb
Overview
index for config.yml
Defined Under Namespace
Classes: Key
Instance Attribute Summary collapse
-
#keys ⇒ Object
readonly
Returns the value of attribute keys.
Instance Method Summary collapse
- #cache_key ⇒ Object
-
#initialize(keys) ⇒ Index
constructor
A new instance of Index.
- #inspect ⇒ Object
- #with_context ⇒ Index
Constructor Details
Instance Attribute Details
#keys ⇒ Object (readonly)
Returns the value of attribute keys.
27 28 29 |
# File 'lib/fusuma/config/index.rb', line 27 def keys @keys end |
Instance Method Details
#cache_key ⇒ Object
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/fusuma/config/index.rb', line 29 def cache_key case @keys when Array @keys.map(&:symbol).join(',') when Key @keys.symbol else raise 'invalid keys' end end |
#inspect ⇒ Object
23 24 25 |
# File 'lib/fusuma/config/index.rb', line 23 def inspect @keys.map(&:inspect) end |