class FigFig
Top level class of the FigTree gem
Constants
- CannotModifyLockedParameterError
- ConfigurationAlreadyDefinedError
- DuplicateParameterDefinitionError
- InvalidLockOptionError
- MissingConfigurationError
- VERSION
Attributes
configuration[RW]
Public Class Methods
configure(reset: nil) { |configuration| ... }
click to toggle source
And we define a wrapper for the configuration block, that we'll use to set up our set of options
# File lib/fig_fig.rb, line 14 def configure(reset: nil) self.reset if reset raise ConfigurationAlreadyDefinedError if @configuration @configuration = ConfigurationContainer.new @configuration.configuring = true yield configuration if block_given? @configuration.configuring = false end
method_missing(method_name, *args, &blk)
click to toggle source
Calls superclass method
# File lib/fig_fig.rb, line 31 def method_missing(method_name, *args, &blk) return super unless configuration.respond_to? method_name configuration.send method_name, *args, &blk end
reset()
click to toggle source
# File lib/fig_fig.rb, line 27 def reset @configuration = nil end
respond_to_missing?(method, _include_private = false)
click to toggle source
Calls superclass method
# File lib/fig_fig.rb, line 36 def respond_to_missing?(method, _include_private = false) configuration.respond_to?(method) || super end