Class: Rack::Rockets::AbstractProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/rockets/abstract.rb

Direct Known Subclasses

Javascript, Stylesheet

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, options = {}, &block) ⇒ AbstractProcessor

Returns a new instance of AbstractProcessor.



4
5
6
# File 'lib/rack/rockets/abstract.rb', line 4

def initialize(path, options = {}, &block)
  self.path = path
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



3
4
5
# File 'lib/rack/rockets/abstract.rb', line 3

def path
  @path
end

Instance Method Details

#call(env) ⇒ Object



8
9
10
11
# File 'lib/rack/rockets/abstract.rb', line 8

def call(env)
  proccess
  render
end

#processObject

Raises:

  • (NotImplementedError)


13
# File 'lib/rack/rockets/abstract.rb', line 13

def process; raise NotImplementedError, 'you must implement the process method' end

#renderObject

Raises:

  • (NotImplementedError)


15
# File 'lib/rack/rockets/abstract.rb', line 15

def render; raise NotImplementedError, 'you must implement the process method' end