Module: Elasticshell::HasVerb

Included in:
Scope, Shell
Defined in:
lib/elasticshell/utils/has_verb.rb

Constant Summary collapse

VERBS =
%w[HEAD GET POST PUT DELETE]

Instance Method Summary collapse

Instance Method Details

#verbObject



6
7
8
# File 'lib/elasticshell/utils/has_verb.rb', line 6

def verb
  @verb ||= "GET"
end

#verb=(new_verb) ⇒ Object



10
11
12
# File 'lib/elasticshell/utils/has_verb.rb', line 10

def verb= new_verb
  @verb = new_verb.to_s.upcase if VERBS.include?(new_verb.to_s.upcase)
end