class GrapeMarkdown::Configuration
Constants
- SETTINGS
Public Class Methods
example_id_type()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 50 def example_id_type @example_id_type ||= :integer end
example_id_type=(value)
click to toggle source
# File lib/grape-markdown/configuration.rb, line 40 def example_id_type=(value) raise UnsupportedIDType unless supported_id_types.include?(value) if value.to_sym == :bson && !Object.const_defined?('BSON') raise BSONNotDefinied end @example_id_type = value end
extend(setting)
click to toggle source
# File lib/grape-markdown/configuration.rb, line 16 def extend(setting) self.class.send :attr_accessor, setting end
generate_id()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 54 def generate_id case example_id_type when :integer SecureRandom.random_number(1000) when :uuid SecureRandom.uuid when :bson BSON::ObjectId.new.to_s end end
include_root()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 32 def include_root @include_root ||= false end
request_headers()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 20 def request_headers @request_headers ||= [] end
resource_exclusion()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 28 def resource_exclusion @resource_exclusion ||= [] end
response_headers()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 24 def response_headers @response_headers ||= [] end
supported_id_types()
click to toggle source
# File lib/grape-markdown/configuration.rb, line 36 def supported_id_types %i(integer uuid bson) end