Class: HaveAPI::Route

Inherits:
Object
  • Object
show all
Defined in:
lib/haveapi/route.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#actionObject (readonly)

Returns the value of attribute action.



3
4
5
# File 'lib/haveapi/route.rb', line 3

def action
  @action
end

#urlObject (readonly)

Returns the value of attribute url.



3
4
5
# File 'lib/haveapi/route.rb', line 3

def url
  @url
end

Instance Method Details

#descriptionObject



14
15
16
# File 'lib/haveapi/route.rb', line 14

def description
  @action.desc
end

#http_methodObject



10
11
12
# File 'lib/haveapi/route.rb', line 10

def http_method
  @action.http_method
end

#paramsObject



18
19
20
# File 'lib/haveapi/route.rb', line 18

def params
  @action.params
end