lib/troo/helpers/remote_model_helpers.rb in troo-0.0.10 vs lib/troo/helpers/remote_model_helpers.rb in troo-0.0.11

- old
+ new

@@ -1,41 +1,50 @@ module Troo module RemoteModelHelpers module ClassMethods + # @param [Array] + # @return [Array] def with_collection(resources = []) resources.map { |resource| new(resource) } end + # @return [Hash] def all {} end + # @return [Hash] def by_board_id {} end + # @return [Hash] def by_list_id {} end + # @return [Hash] def by_card_id {} end + # @return [Hash] def by_member_id {} end end module InstanceMethods + # @return [] def preprocess associations.map do |association| associated(association).map { |record| record.preprocess } end Persistence::Local.persist(self) end + # @return [Ohm::Model] def local @local ||= local_model.by_external_id(id) end private