Sha256: 3b32bd60050006d17ac11dc92c665c2323d0e5003f333079c239b0e92f0b5945

Contents?: true

Size: 717 Bytes

Versions: 8

Compression:

Stored size: 717 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[:io]

          description "Specify organization."

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

          default { Container[:settings].git_hub_organization }

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

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

          private

          attr_reader :processor
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pennyworth-17.8.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.7.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.6.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.5.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.4.1 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.4.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.3.0 lib/pennyworth/cli/actions/git_hub/organization.rb
pennyworth-17.2.0 lib/pennyworth/cli/actions/git_hub/organization.rb