Class: Tansu::Context

Inherits:
Minicontext::Context
  • Object
show all
Defined in:
lib/tansu/context.rb

Constant Summary collapse

METHODS =
%w(GET HEAD POST PATCH PUT DELETE)
KEYWORD =
Minicontext::Context::KEYWORD + METHODS

Instance Method Summary collapse

Instance Method Details

#call(name) ⇒ Object



17
18
19
# File 'lib/tansu/context.rb', line 17

def call(name)
  (val = super(name)) ? val : super(:*)
end

#get(name, &block) ⇒ Object



6
7
8
9
# File 'lib/tansu/context.rb', line 6

def get(name, &block)
  context(name) { task 'GET', &block }
  head(name, &block)
end