class Euler::ConfigOptions
This class holds the Euler
module's configuration.
Public Class Methods
new()
click to toggle source
Initialize an empty OpenStruct to hold configuration options
# File lib/euler.rb, line 17 def initialize @config = OpenStruct.new end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
To set a config option call the corresponding method with an argument. To retrieve a config option call the corresponding method without an argument.
# File lib/euler.rb, line 23 def method_missing method, *args, &block if args.empty? @config.send(method) else @config.send("#{method}=", args.first) end end