Module: Grape::DSL::Configuration::ClassMethods

Defined in:
lib/grape/dsl/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#logger(logger = nil) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/grape/dsl/configuration.rb', line 12

def logger(logger = nil)
  if logger
    @logger = logger
  else
    @logger ||= Logger.new($stdout)
  end
end

#settingsObject (readonly)

Returns the value of attribute settings.



10
11
12
# File 'lib/grape/dsl/configuration.rb', line 10

def settings
  @settings
end

Instance Method Details

#desc(description, options = {}) ⇒ Object

Add a description to the next namespace or function.



21
22
23
# File 'lib/grape/dsl/configuration.rb', line 21

def desc(description, options = {})
  @last_description = options.merge(description: description)
end