Sha256: 202c8059e65dbb7da15d2efe0a0786addc761c7d932e2e96f52bd9da9ba2e861

Contents?: true

Size: 711 Bytes

Versions: 4

Compression:

Stored size: 711 Bytes

Contents

module Restfulie::Server::Configuration
  #Defines host to be passed to polymorphic_url.
  # You need to setup this to your own domain in order to generate meaningful links.
  mattr_accessor :host
  @@host = 'localhost'
  
  # Passes a symbol to polymorphic_url in order to use a namespaced named_route.
  # So, if config.named_route_prefix = :rest, it will search for rest_album_url,
  # rest_album_songs_url, and so on.
  mattr_accessor :named_route_prefix
  @@named_route_prefix = nil
        
  # This defines a Rails-like way to setup options. You can do, in a initializer:
  #   Restfulie::Server.setup do |config|
  #     config.host = 'mydomain.com'
  #   end
  def self.setup
    yield self
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
restfulie-0.8.0 lib/restfulie/server/configuration.rb
restfulie-0.7.2 lib/restfulie/server/configuration.rb
restfulie-0.7.1 lib/restfulie/server/configuration.rb
restfulie-0.7.0 lib/restfulie/server/configuration.rb