Sha256: 15ae2c691fcdf3b88b10ae65c6598b227c7374ffa841b3c7a12d1d9fd66315b6

Contents?: true

Size: 1.02 KB

Versions: 12

Compression:

Stored size: 1.02 KB

Contents

require 'ldp/version'
require 'rdf/turtle'
require 'json/ld'
require 'rdf/isomorphic'
require 'rdf/vocab/ldp'
require 'logger'
require 'singleton'
require 'deprecation'

module Ldp
  RDF::Graph.send(:include, RDF::Isomorphic)

  require 'ldp/error'
  require 'ldp/client'
  require 'ldp/uri'

  extend Uri

  autoload :Response, 'ldp/response'
  autoload :Resource, 'ldp/resource'
  autoload :Container, 'ldp/container'

  autoload :Orm, 'ldp/orm'

  # Returned when there is no result (e.g. 404)
  class NoneClass
    include Singleton
  end
  # The single global instance of NoneClass, representing the empty Option
  None = NoneClass.instance # :doc:

  class << self
    def logger
      @logger ||= Logger.new(STDOUT).tap do |log|
        log.level = Logger::WARN
      end
    end

    def instrument *args, &block
      if defined?(::ActiveSupport) && defined?(::ActiveSupport::Notifications)
        ActiveSupport::Notifications.instrument *args, &block
      else
        yield
      end
    end

    attr_writer :logger
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ldp-1.0.3 lib/ldp.rb
ldp-1.0.2 lib/ldp.rb
ldp-1.0.1 lib/ldp.rb
ldp-1.0.0 lib/ldp.rb
ldp-0.7.2 lib/ldp.rb
ldp-0.7.1 lib/ldp.rb
ldp-0.7.0 lib/ldp.rb
ldp-0.6.4 lib/ldp.rb
ldp-0.6.3 lib/ldp.rb
ldp-0.6.2 lib/ldp.rb
ldp-0.6.1 lib/ldp.rb
ldp-0.6.0 lib/ldp.rb