Sha256: 3c8f79f80be486701d12b23ce9c6e41782fa9d53e8214ef175ec12f150fa9e03
Contents?: true
Size: 667 Bytes
Versions: 19
Compression:
Stored size: 667 Bytes
Contents
# Describes a single API action (route). Is used internally by Apiculture. class Apiculture::ActionDefinition attr_accessor :description attr_accessor :http_verb attr_accessor :path attr_reader :parameters attr_reader :route_parameters attr_reader :responses def all_parameter_names_as_strings @parameters.map(&:name_as_string) + @route_parameters.map(&:name_as_string) end def defines_responses? @responses.any? end def defines_request_params? @parameters.any? end def defines_route_params? @route_parameters.any? end def initialize @parameters, @route_parameters, @responses = [], [], [] end end
Version data entries
19 entries across 19 versions & 1 rubygems