Class: Garage::Config::Builder

Inherits:
Object
  • Object
show all
Defined in:
lib/garage/config.rb

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Builder

Returns a new instance of Builder.



68
69
70
71
# File 'lib/garage/config.rb', line 68

def initialize(&block)
  @config = Config.new
  instance_eval(&block)
end

Instance Method Details

#buildObject



73
74
75
# File 'lib/garage/config.rb', line 73

def build
  @config
end

#cast_resource(&block) ⇒ Object



77
78
79
# File 'lib/garage/config.rb', line 77

def cast_resource(&block)
  @config.cast_resource = block
end

#docsObject



81
82
83
# File 'lib/garage/config.rb', line 81

def docs
  @docs_builder ||= Docs::Config::Builder.new(@config.docs)
end