Sha256: 4bac4420e0a5da975ad2bbc992a4a9cbebfc96dd936f4fefa6444dbc7a41789c

Contents?: true

Size: 737 Bytes

Versions: 15

Compression:

Stored size: 737 Bytes

Contents

# frozen_string_literal: true

require "sod"

module Pennyworth
  module CLI
    module Actions
      module GitHub
        # Handles the GitHub user action.
        class Organization < Sod::Action
          include Import[:kernel]

          description "Specify organization."

          on %w[-o --organization], argument: "[HANDLE]"

          default { Container[:configuration].git_hub_organization }

          def initialize(processor: Processor.for_projects, **)
            super(**)
            @processor = processor
          end

          def call(handle = nil) = kernel.puts processor.call("orgs/#{handle || default}").to_json

          private

          attr_reader :processor
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pennyworth-16.7.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.5.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.4.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.3.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.2.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.1.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-16.0.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.4.1 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.4.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.3.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.2.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.1.1 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.1.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.0.3 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-15.0.2 lib/pennyworth/cli/actions/git_hub/organization.rb