class Pieces::Rails

Public Class Methods

mount(config = {}) click to toggle source
# File lib/pieces/rails.rb, line 5
def self.mount(config = {})
  mounted_at = config.delete(:at)

  config = Config.new(config.merge(path: config[:path] || ::Rails.root,
                                   '_mounted_at' => mounted_at))

  { new(config).mount => mounted_at }
end

Public Instance Methods

mount() click to toggle source
# File lib/pieces/rails.rb, line 16
def mount
  Server.new(config).app
end