lib/grape-markdown/configuration.rb in grape-markdown-0.0.6 vs lib/grape-markdown/configuration.rb in grape-markdown-0.0.7

- old
+ new

@@ -1,16 +1,16 @@ module GrapeMarkdown class Configuration - SETTINGS = [ - :name, - :description, - :request_headers, - :response_headers, - :example_id_type, - :resource_exclusion, - :include_root - ] + SETTINGS = %i( + name + description + request_headers + response_headers + example_id_type + resource_exclusion + include_root + ).freeze class << self attr_accessor(*SETTINGS) def extend(setting) @@ -32,17 +32,17 @@ def include_root @include_root ||= false end def supported_id_types - [:integer, :uuid, :bson] + %i(integer uuid bson) end def example_id_type=(value) - fail UnsupportedIDType unless supported_id_types.include?(value) + raise UnsupportedIDType unless supported_id_types.include?(value) if value.to_sym == :bson && !Object.const_defined?('BSON') - fail BSONNotDefinied + raise BSONNotDefinied end @example_id_type = value end