Class: Dao::Endpoint
- Inherits:
-
Object
- Object
- Dao::Endpoint
- Defined in:
- lib/dao/endpoint.rb
Constant Summary collapse
- Attrs =
%w( api path route block doc )
Instance Method Summary collapse
- #arity ⇒ Object
- #call(*args) ⇒ Object
-
#initialize(options = {}) ⇒ Endpoint
constructor
A new instance of Endpoint.
- #to_proc ⇒ Object
- #update(options = {}) ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Endpoint
Returns a new instance of Endpoint.
7 8 9 |
# File 'lib/dao/endpoint.rb', line 7 def initialize( = {}) update() end |
Instance Method Details
#arity ⇒ Object
17 18 19 |
# File 'lib/dao/endpoint.rb', line 17 def arity block.arity end |
#call(*args) ⇒ Object
21 22 23 |
# File 'lib/dao/endpoint.rb', line 21 def call(*args) block.call(*args) end |
#to_proc ⇒ Object
25 26 27 |
# File 'lib/dao/endpoint.rb', line 25 def to_proc block end |
#update(options = {}) ⇒ Object
11 12 13 14 15 |
# File 'lib/dao/endpoint.rb', line 11 def update( = {}) .each do |key, val| send("#{ key }=", val) end end |