Sha256: 025ab4ec350a74265de738a424d59bf313e4929b6a53171aacf835fb87b7b1fb
Contents?: true
Size: 815 Bytes
Versions: 9
Compression:
Stored size: 815 Bytes
Contents
require "jdc/cli/populators/base" require "jdc/cli/populators/populator_methods" module JDC module Populators class Organization < Base include PopulatorMethods def changed info[:space] = nil end private def choices organization_response = client.organizations_first_page(:depth => 0) if organization_response[:next_page] "Login successful. Too many organizations (>50) to list. Remember to set your target organization using 'target -o [ORGANIZATION]'." else organization_response[:results] end end def valid?(organization) return false unless organization.guid organization.users.include? client.current_user rescue JFoundry::APIError false end end end end
Version data entries
9 entries across 9 versions & 1 rubygems