Class: Leftovers::ConfigLoader::TrueSchema
- Defined in:
- lib/leftovers/config_loader/true_schema.rb
Class Method Summary collapse
Methods inherited from Schema
Class Method Details
.to_ruby(node) ⇒ Object
12 13 14 |
# File 'lib/leftovers/config_loader/true_schema.rb', line 12 def to_ruby(node) node.to_ruby == true || node.to_ruby == 'true' end |
.validate(node) ⇒ Object
7 8 9 10 |
# File 'lib/leftovers/config_loader/true_schema.rb', line 7 def validate(node) error(node, 'be true') unless to_ruby(node) super end |