Module: Evvnt::Actions
- Included in:
- Base
- Defined in:
- lib/evvnt/actions.rb
Overview
Internal: Methods for defining API actions for each resource Class.
Instance Method Summary collapse
-
#first ⇒ Object
The first record from the API index actions.
-
#last ⇒ Object
The last record from the API index actions.
Instance Method Details
#first ⇒ Object
The first record from the API index actions
Returns Base subclass
9 10 11 |
# File 'lib/evvnt/actions.rb', line 9 def first defined_actions.include?(:index) ? all.first : method_missing(:first) end |
#last ⇒ Object
The last record from the API index actions
Returns Base subclass
17 18 19 |
# File 'lib/evvnt/actions.rb', line 17 def last defined_actions.include?(:index) ? all.first : method_missing(:last) end |