Sha256: a17a3c8f96f0d921a806d597f130863e4a6e6e3eb771295e91471d815a461ac9
Contents?: true
Size: 937 Bytes
Versions: 4
Compression:
Stored size: 937 Bytes
Contents
require 'rspec_api_docs/formatter/resource/example' require 'rspec_api_docs/formatter/resource/parameter' require 'rspec_api_docs/formatter/resource/response_field' module RspecApiDocs class Resource attr_reader :rspec_example # Returns an array of {Example}s # # @return [Array<Example>] attr_accessor :examples def initialize(rspec_example) @rspec_example = rspec_example @examples = [] end # The name of the resource. # # E.g. "Characters" # # @return [String] def name metadata.fetch(:resource_name, rspec_example.metadata[:example_group][:description]) end # The description of the resource. # # E.g. "Orders can be created, viewed, and deleted" # # @return [String] def description metadata[:resource_description] end private def metadata rspec_example.metadata[METADATA_NAMESPACE] end end end
Version data entries
4 entries across 4 versions & 1 rubygems