Class: Sinatra::ContentFor2::BaseHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/sinatra/content_for2/base_handler.rb

Direct Known Subclasses

ErbHandler, HamlHandler, SlimHandler

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template) ⇒ BaseHandler

Returns a new instance of BaseHandler.



14
15
16
# File 'lib/sinatra/content_for2/base_handler.rb', line 14

def initialize(template)
  @template = template
end

Instance Attribute Details

#templateObject (readonly)

Returns the value of attribute template.



12
13
14
# File 'lib/sinatra/content_for2/base_handler.rb', line 12

def template
  @template
end

Class Method Details

.classesObject



3
4
5
# File 'lib/sinatra/content_for2/base_handler.rb', line 3

def classes
  @classes ||= []
end

.register(handlerClass) ⇒ Object



7
8
9
# File 'lib/sinatra/content_for2/base_handler.rb', line 7

def register(handlerClass)
  classes << handlerClass
end

Instance Method Details

#block_is_type?(block) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


26
27
28
# File 'lib/sinatra/content_for2/base_handler.rb', line 26

def block_is_type?(block)
  raise NotImplementedError.new
end

#capture_from_template(*args, &block) ⇒ Object

Raises:

  • (NotImplementedError)


30
31
32
# File 'lib/sinatra/content_for2/base_handler.rb', line 30

def capture_from_template(*args, &block)
  raise NotImplementedError.new
end

#enginesObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/sinatra/content_for2/base_handler.rb', line 18

def engines
  raise NotImplementedError.new
end

#is_type?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


22
23
24
# File 'lib/sinatra/content_for2/base_handler.rb', line 22

def is_type?
  raise NotImplementedError.new
end