Class: Grape::Middleware::Versioner::Base::Options

Inherits:
Data
  • Object
show all
Includes:
DeprecatedOptionsHashAccess
Defined in:
lib/grape/middleware/versioner/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DeprecatedOptionsHashAccess

#[]

Constructor Details

#initialize(content_types: nil, format: nil, mount_path: nil, pattern: /.*/i, prefix: nil, version_options: Grape::DSL::VersionOptions.new, versions: nil) ⇒ Options

Returns a new instance of Options.



15
16
17
18
19
20
# File 'lib/grape/middleware/versioner/base.rb', line 15

def initialize(
  content_types: nil, format: nil, mount_path: nil, pattern: /.*/i, prefix: nil,
  version_options: Grape::DSL::VersionOptions.new, versions: nil
)
  super
end

Instance Attribute Details

#content_typesObject (readonly)

Returns the value of attribute content_types

Returns:

  • (Object)

    the current value of content_types



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def content_types
  @content_types
end

#formatObject (readonly)

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def format
  @format
end

#mount_pathObject (readonly)

Returns the value of attribute mount_path

Returns:

  • (Object)

    the current value of mount_path



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def mount_path
  @mount_path
end

#patternObject (readonly)

Returns the value of attribute pattern

Returns:

  • (Object)

    the current value of pattern



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def pattern
  @pattern
end

#prefixObject (readonly)

Returns the value of attribute prefix

Returns:

  • (Object)

    the current value of prefix



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def prefix
  @prefix
end

#version_optionsObject (readonly)

Returns the value of attribute version_options

Returns:

  • (Object)

    the current value of version_options



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def version_options
  @version_options
end

#versionsObject (readonly)

Returns the value of attribute versions

Returns:

  • (Object)

    the current value of versions



10
11
12
# File 'lib/grape/middleware/versioner/base.rb', line 10

def versions
  @versions
end