Class: Lookbook::YamlResolver
- Inherits:
-
DataResolver
- Object
- Service
- DataResolver
- Lookbook::YamlResolver
- Defined in:
- lib/lookbook/services/data/resolvers/yaml_resolver.rb
Constant Summary collapse
- MATCHER =
/((?:\{|\[)(.*?)(?:\]|\}))$/m
- MATCH_INDEX =
1
Instance Attribute Summary
Attributes inherited from DataResolver
#base_dir, #eval_context, #fallback, #file
Class Method Summary collapse
Methods inherited from DataResolver
Methods inherited from Service
Constructor Details
This class inherits a constructor from Lookbook::DataResolver
Class Method Details
.resolveable?(input) ⇒ Boolean
6 7 8 |
# File 'lib/lookbook/services/data/resolvers/yaml_resolver.rb', line 6 def self.resolveable?(input) input.to_s.match?(MATCHER) && YamlParser.call(input, fail_silently: true) end |