Module: Grape::DSL::Configuration::ClassMethods
- Defined in:
- lib/grape/dsl/configuration.rb
Instance Attribute Summary collapse
- #logger(logger = nil) ⇒ Object
-
#settings ⇒ Object
readonly
Returns the value of attribute settings.
Instance Method Summary collapse
-
#desc(description, options = {}) ⇒ Object
Add a description to the next namespace or function.
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 |
#settings ⇒ Object (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, = {}) @last_description = .merge(description: description) end |