lib/kentaa/api/resources/actions.rb in kentaa-api-0.2.1 vs lib/kentaa/api/resources/actions.rb in kentaa-api-0.3.0

- old
+ new

@@ -1,26 +1,31 @@ # frozen_string_literal: true module Kentaa module Api module Resources - class Actions < Base + class Actions < List include Enumerable - include Kentaa::Api::Resources::Pagination def each(&block) actions.each(&block) end + protected + + def load_resource(options) + request.get("/actions", options) + end + private def actions @actions ||= begin actions = [] if data data.each do |action| - actions << Kentaa::Api::Resources::Action.new(config, action) + actions << Kentaa::Api::Resources::Action.new(config, data: action) end end actions end