Class: Module

Inherits:
Object
  • Object
show all
Defined in:
lib/e-ext.rb

Overview

to run a slice without explicitly building a new app, require e-ext and call SliceName.run(:some => :opts).

Examples:

require 'e'
require 'e-ext'

module Cms
  class Articles < E
    # ...
  end
  class News < E
    # ...
  end
end
Cms.run :server => :Thin, :port => 9292

Instance Method Summary collapse

Instance Method Details

#mount(*roots, &setup) ⇒ Object



19
20
21
# File 'lib/e-ext.rb', line 19

def mount *roots, &setup
  EBuilder.new.mount self, *roots, &setup
end

#run(*args) ⇒ Object



23
24
25
# File 'lib/e-ext.rb', line 23

def run *args
  mount.run *args
end