class Gitosis::Config
Public Class Methods
new(&block)
click to toggle source
# File lib/gitosis_easy_conf/config.rb, line 3 def initialize(&block) @configs = {} instance_eval(&block) end
Public Instance Methods
method_missing(method, *args, &block)
click to toggle source
# File lib/gitosis_easy_conf/config.rb, line 8 def method_missing(method, *args, &block) if args.length > 0 || block_given? @configs[method] = case method when :fork_naming_convention then if block_given? && ![2,-1].include?(block.arity) raise BlockArityIncorrect, "Block needs exactly two arguments" end block when :filename then args.first else [args, block] end else @configs[method] end end