Sha256: cd8014ff4f4f177bc867fefcc0ef063d2a85afb2198201f8aeef8c849f7717c3

Contents?: true

Size: 523 Bytes

Versions: 2

Compression:

Stored size: 523 Bytes

Contents

module Webmention
  module CLI
    module Commands
      class Endpoint
        def initialize(url)
          @url = url
        end

        def run
          IndieWeb::Endpoints.get(@url)[:webmention]
        rescue IndieWeb::Endpoints::ArgumentError,
               IndieWeb::Endpoints::InvalidURIError => exception
          raise ArgumentError, exception
        rescue IndieWeb::Endpoints::IndieWebEndpointsError => exception
          raise WebmentionEndpointError, exception
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webmention-cli-1.5.0 lib/webmention/cli/commands/endpoint.rb
webmention-cli-1.4.0 lib/webmention/cli/commands/endpoint.rb