class ApipieBindings::Example
Attributes
args[R]
http_method[R]
path[R]
response[R]
status[R]
Public Class Methods
new(http_method, path, args, status, response)
click to toggle source
# File lib/apipie_bindings/example.rb, line 7 def initialize(http_method, path, args, status, response) @http_method = http_method @path = path @args = args @status = status.to_i @response = response end
parse(example)
click to toggle source
# File lib/apipie_bindings/example.rb, line 15 def self.parse(example) prep = /(\w+)\ ([^\n]*)\n?(.*)?\n(\d+)\n(.*)/m.match(example) new(*prep[1..5]) end