Class: Nitro::Morpher

Inherits:
Object
  • Object
show all
Defined in:
lib/nitro/compiler/morphing.rb

Overview

The base morpher class. Morphers are triggered by a special ‘key’ attribute in the xml stream and transform the owner element.

key = attribute ‘key’ name = element name attributes = alement attributes

Direct Known Subclasses

EachMorpher, SharedMorpher, StandardMorpher

Instance Method Summary collapse

Constructor Details

#initialize(key, name, attributes, compiler = nil) ⇒ Morpher

Returns a new instance of Morpher.



20
21
22
23
24
25
26
# File 'lib/nitro/compiler/morphing.rb', line 20

def initialize(key, name, attributes, compiler = nil)
  @key = key
  @name = name
  @attributes = attributes
  @value = @attributes[@key]
  @compiler = compiler
end

Instance Method Details

#after_end(buffer) ⇒ Object



31
# File 'lib/nitro/compiler/morphing.rb', line 31

def after_end(buffer); end

#after_start(buffer) ⇒ Object



29
# File 'lib/nitro/compiler/morphing.rb', line 29

def after_start(buffer); end

#before_end(buffer) ⇒ Object



30
# File 'lib/nitro/compiler/morphing.rb', line 30

def before_end(buffer); end

#before_start(buffer) ⇒ Object



28
# File 'lib/nitro/compiler/morphing.rb', line 28

def before_start(buffer); end