Module: Levels::MethodMissing
- Included in:
- Configuration, ConfiguredGroup, Group, LazyEvaluator::DSL, Level
- Defined in:
- lib/levels/method_missing.rb
Overview
Enables dot syntax for levels and groups.
Instance Method Summary collapse
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(message, *args, &block) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/levels/method_missing.rb', line 5 def method_missing(, *args, &block) raise ArgumentError, "arguments are not allowed: #{}(#{args.inspect})" if args.any? if =~ /^(.*)\?$/ self.defined?($1.to_sym) else self[] end end |