Class: HaveAPI::Route
- Inherits:
-
Object
- Object
- HaveAPI::Route
- Defined in:
- lib/haveapi/route.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
- #description ⇒ Object
- #http_method ⇒ Object
-
#initialize(url, action) ⇒ Route
constructor
A new instance of Route.
- #params ⇒ Object
Constructor Details
#initialize(url, action) ⇒ Route
Returns a new instance of Route.
5 6 7 8 |
# File 'lib/haveapi/route.rb', line 5 def initialize(url, action) @url = url @action = action end |
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
3 4 5 |
# File 'lib/haveapi/route.rb', line 3 def action @action end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/haveapi/route.rb', line 3 def url @url end |
Instance Method Details
#description ⇒ Object
14 15 16 |
# File 'lib/haveapi/route.rb', line 14 def description @action.desc end |
#http_method ⇒ Object
10 11 12 |
# File 'lib/haveapi/route.rb', line 10 def http_method @action.http_method end |
#params ⇒ Object
18 19 20 |
# File 'lib/haveapi/route.rb', line 18 def params @action.params end |