2012-02-09 22:05:12 +00:00
|
|
|
require "attentive/version"
|
|
|
|
|
|
|
|
module Attentive
|
|
|
|
autoload :Server, 'attentive/server'
|
|
|
|
|
|
|
|
class << self
|
2012-03-23 19:43:00 +00:00
|
|
|
attr_accessor :title, :has_presentation, :use_pygments_command_line
|
2012-02-13 16:32:46 +00:00
|
|
|
|
|
|
|
def has_presentation?
|
|
|
|
@has_presentation == true
|
|
|
|
end
|
2012-02-13 17:10:05 +00:00
|
|
|
|
2012-03-23 19:43:00 +00:00
|
|
|
def use_pygments_command_line?
|
|
|
|
(@use_pygments_command_line ||= true) == true
|
|
|
|
end
|
|
|
|
|
2012-02-13 17:10:05 +00:00
|
|
|
def middleware
|
|
|
|
@middleware ||= []
|
|
|
|
end
|
2012-02-09 22:05:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.configure
|
|
|
|
yield self
|
2012-02-13 16:32:46 +00:00
|
|
|
|
|
|
|
Attentive.has_presentation = true
|
2012-02-09 22:05:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def self.root
|
|
|
|
Pathname(File.expand_path('../..', __FILE__))
|
|
|
|
end
|
2012-02-13 16:32:46 +00:00
|
|
|
|
|
|
|
class NoPresentationError < StandardError ; end
|
2012-02-09 22:05:12 +00:00
|
|
|
end
|
2012-02-13 17:10:05 +00:00
|
|
|
|