Class: Grape::Middleware::Formatter::Options

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DeprecatedOptionsHashAccess

#[]

Constructor Details

#initialize(content_types: nil, default_format: :txt, format: nil, formatters: nil, parsers: nil) ⇒ Options

Returns a new instance of Options.



12
13
14
# File 'lib/grape/middleware/formatter.rb', line 12

def initialize(content_types: nil, default_format: :txt, format: nil, formatters: nil, parsers: nil)
  super
end

Instance Attribute Details

#content_typesObject (readonly)

Returns the value of attribute content_types

Returns:

  • (Object)

    the current value of content_types



9
10
11
# File 'lib/grape/middleware/formatter.rb', line 9

def content_types
  @content_types
end

#default_formatObject (readonly)

Returns the value of attribute default_format

Returns:

  • (Object)

    the current value of default_format



9
10
11
# File 'lib/grape/middleware/formatter.rb', line 9

def default_format
  @default_format
end

#formatObject (readonly)

Returns the value of attribute format

Returns:

  • (Object)

    the current value of format



9
10
11
# File 'lib/grape/middleware/formatter.rb', line 9

def format
  @format
end

#formattersObject (readonly)

Returns the value of attribute formatters

Returns:

  • (Object)

    the current value of formatters



9
10
11
# File 'lib/grape/middleware/formatter.rb', line 9

def formatters
  @formatters
end

#parsersObject (readonly)

Returns the value of attribute parsers

Returns:

  • (Object)

    the current value of parsers



9
10
11
# File 'lib/grape/middleware/formatter.rb', line 9

def parsers
  @parsers
end