Class: DSL::Maker::Base
- Inherits:
-
Object
- Object
- DSL::Maker::Base
- Defined in:
- lib/dsl/maker.rb
Overview
This is the base class for all DSL-parsing classes.
Instance Method Summary collapse
-
#default(method_name, args, position = 0) ⇒ Object
A helper method for handling defaults from args easily.
Instance Method Details
#default(method_name, args, position = 0) ⇒ Object
A helper method for handling defaults from args easily.
22 23 24 25 26 27 28 |
# File 'lib/dsl/maker.rb', line 22 def default(method_name, args, position=0) method = method_name.to_sym if args.length >= (position + 1) && !self.send(method) self.send(method, args[position]) end return end |