class RspecApiDocs::Resource::ResponseField

Attributes

field[R]
name[R]

Public Class Methods

new(name, field) click to toggle source
# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 6
def initialize(name, field)
  @name = name
  @field = field
end

Public Instance Methods

==(other) click to toggle source

@return [true, false]

# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 38
def ==(other)
  name == other.name &&
    field == other.field
end
description() click to toggle source

The description of the response field

@return [String]

# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 28
def description
  field[:description]
end
example() click to toggle source

Example value

# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 33
def example
  field[:example]
end
scope() click to toggle source

The scope of the response field

@return [Array<String>]

# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 14
def scope
  field[:scope]
end
type() click to toggle source

The type of the response field

@return [String]

# File lib/rspec_api_docs/formatter/resource/response_field.rb, line 21
def type
  field[:type]
end