Sha256: edbe28be745eb10fac6ea14d70eb92223d8c39bc686a317c2db024034e87202e

Contents?: true

Size: 521 Bytes

Versions: 4

Compression:

Stored size: 521 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

4 entries across 4 versions & 1 rubygems

Version Path
webmention-cli-1.3.0 lib/webmention/cli/commands/endpoint.rb
webmention-cli-1.2.0 lib/webmention/cli/commands/endpoint.rb
webmention-cli-1.1.0 lib/webmention/cli/commands/endpoint.rb
webmention-cli-1.0.0 lib/webmention/cli/commands/endpoint.rb