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

Instance Method Details

#firstObject

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

#lastObject

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