Module: Reuters::Namespaces::Base::ClassMethods

Included in:
Reuters::Namespaces::Base
Defined in:
lib/reuters/namespaces/base.rb

Overview

Class based methods that are set in every module that includes this base module.

Instance Method Summary collapse

Instance Method Details

#configure {|config| ... } ⇒ Object

Enables this namespace to be configured by passing in itself as a block which enables static variables to be set.

Yields:

  • (config)

    The namespace to be configured.



30
31
32
# File 'lib/reuters/namespaces/base.rb', line 30

def configure
  yield self
end

#endpointString

Note:

The returned string is prefixed with the configured #namespaces_endpoint.

Represents the fully resolved namespace endpoint for the Namespace module that has included this class method.

Returns:

  • (String)

    the fully resolved namespace endpoint.



21
22
23
# File 'lib/reuters/namespaces/base.rb', line 21

def endpoint
  "#{Reuters.namespaces_endpoint}/#{year}/#{month}/#{day}/webservices/rkd/#{name}"
end