lib/troo/external/member.rb in troo-0.0.7 vs lib/troo/external/member.rb in troo-0.0.8

- old
+ new

@@ -1,30 +1,12 @@ module Troo module External class Member < Resource - class << self - def fetch(external_id, options = {}) - new(external_id, options).fetch_by_external_id.map do |resource| - MemberPersistence.for(resource) - end - end + def persist + Persistence::Member.with_collection(fetch) end - def initialize(external_id, options = {}) - @external_id = external_id - @options = options - end - private - attr_reader :external_id - - def options - defaults.merge!(@options) - end - - def defaults - { mode: :board } - end def by_board_id Trello::Board.find(external_id).members end