Module: Lunetas::Candy::MethodStrategy::InstanceMethods

Defined in:
lib/lunetas/candy/method_strategy.rb

Instance Method Summary collapse

Instance Method Details

#beforenil

Called before getting the response. Useful to set instance variables that will be used in the methods. Analog to a before filter in Rails.

Returns:

  • (nil)


11
12
13
# File 'lib/lunetas/candy/method_strategy.rb', line 11

def before
  nil
end

#deletenil

The response of the DELETE HTTP method.

Returns:

  • (nil)

Raises:



43
44
45
# File 'lib/lunetas/candy/method_strategy.rb', line 43

def delete
  raise Lunetas::Error::APIError
end

#getnil

The response of the GET HTTP method.

Returns:

  • (nil)

Raises:



19
20
21
# File 'lib/lunetas/candy/method_strategy.rb', line 19

def get
  raise Lunetas::Error::APIError
end

#headnil

The response of the HEAD HTTP method.

Returns:

  • (nil)

Raises:



51
52
53
# File 'lib/lunetas/candy/method_strategy.rb', line 51

def head
  raise Lunetas::Error::APIError
end

#optionsnil

The response of the OPTIONS HTTP method.

Returns:

  • (nil)

Raises:



67
68
69
# File 'lib/lunetas/candy/method_strategy.rb', line 67

def options
  raise Lunetas::Error::APIError
end

#other_verb(verb) ⇒ nil

The response of the any other HTTP method.

Parameters:

  • verb (String)

    the HTTP method that was called from.

Returns:

  • (nil)

Raises:



76
77
78
# File 'lib/lunetas/candy/method_strategy.rb', line 76

def other_verb(verb)
  raise Lunetas::Error::APIError
end

#postnil

The response of the POST HTTP method.

Returns:

  • (nil)

Raises:



27
28
29
# File 'lib/lunetas/candy/method_strategy.rb', line 27

def post
  raise Lunetas::Error::APIError
end

#putnil

The response of the PUT HTTP method.

Returns:

  • (nil)

Raises:



35
36
37
# File 'lib/lunetas/candy/method_strategy.rb', line 35

def put
  raise Lunetas::Error::APIError
end

#tracenil

The response of the TRACE HTTP method.

Returns:

  • (nil)

Raises:



59
60
61
# File 'lib/lunetas/candy/method_strategy.rb', line 59

def trace
  raise Lunetas::Error::APIError
end