class Skeleton::Path
Attributes
operations[R]
Public Class Methods
new()
click to toggle source
# File lib/skeleton/path.rb, line 7 def initialize @operations = Hash.new end
Public Instance Methods
delete(&block)
click to toggle source
# File lib/skeleton/path.rb, line 51 def delete(&block) operation(:delete, &block) end
delete?()
click to toggle source
# File lib/skeleton/path.rb, line 55 def delete? @operations.key?(:delete) end
get(&block)
click to toggle source
# File lib/skeleton/path.rb, line 19 def get(&block) operation(:get, &block) end
get?()
click to toggle source
# File lib/skeleton/path.rb, line 23 def get? @operations.key?(:get) end
head(&block)
click to toggle source
# File lib/skeleton/path.rb, line 11 def head(&block) operation(:head, &block) end
head?()
click to toggle source
# File lib/skeleton/path.rb, line 15 def head? @operations.key?(:head) end
operation(type, &block)
click to toggle source
# File lib/skeleton/path.rb, line 67 def operation(type, &block) @operations[type] = Skeleton::Operation.new @operations[type].instance_eval(&block) @operations[type] end
options(&block)
click to toggle source
# File lib/skeleton/path.rb, line 59 def options(&block) operation(:options, &block) end
options?()
click to toggle source
# File lib/skeleton/path.rb, line 63 def options? @operations.key?(:options) end
patch(&block)
click to toggle source
# File lib/skeleton/path.rb, line 43 def patch(&block) operation(:patch, &block) end
patch?()
click to toggle source
# File lib/skeleton/path.rb, line 47 def patch? @operations.key?(:patch) end
post(&block)
click to toggle source
# File lib/skeleton/path.rb, line 35 def post(&block) operation(:post, &block) end
post?()
click to toggle source
# File lib/skeleton/path.rb, line 39 def post? @operations.key?(:post) end
put(&block)
click to toggle source
# File lib/skeleton/path.rb, line 27 def put(&block) operation(:put, &block) end
put?()
click to toggle source
# File lib/skeleton/path.rb, line 31 def put? @operations.key?(:put) end