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.
6 7 8 |
# File 'lib/dao/endpoint.rb', line 6 def initialize( = {}) update() end |
Instance Method Details
#arity ⇒ Object
16 17 18 |
# File 'lib/dao/endpoint.rb', line 16 def arity block.arity end |
#call(*args) ⇒ Object
20 21 22 |
# File 'lib/dao/endpoint.rb', line 20 def call(*args) block.call(*args) end |
#to_proc ⇒ Object
24 25 26 |
# File 'lib/dao/endpoint.rb', line 24 def to_proc block end |
#update(options = {}) ⇒ Object
10 11 12 13 14 |
# File 'lib/dao/endpoint.rb', line 10 def update( = {}) .each do |key, val| send("#{ key }=", val) end end |