Class: Slimi::Filters::Base

Inherits:
Temple::HTML::Filter
  • Object
show all
Defined in:
lib/slimi/filters/base.rb

Overview

Pass-through some expressions which are unknown for Temple.

Instance Method Summary collapse

Instance Method Details

#on_slimi_control(code, expression) ⇒ Array

Parameters:

  • code (String)
  • expression (Array)

Returns:

  • (Array)


12
13
14
# File 'lib/slimi/filters/base.rb', line 12

def on_slimi_control(code, expression)
  [:slimi, :control, code, compile(expression)]
end

#on_slimi_embedded(type, expression, attributes) ⇒ Array

Parameters:

  • type (String)
  • code (String)
  • expression (Array)
  • attributes (Array)

Returns:

  • (Array)


21
22
23
# File 'lib/slimi/filters/base.rb', line 21

def on_slimi_embedded(type, expression, attributes)
  [:slimi, :embedded, type, compile(expression), attributes]
end

#on_slimi_output(escape, code, expression) ⇒ Array

Parameters:

  • escape (Boolean)
  • code (String)
  • expression (Array)

Returns:

  • (Array)


29
30
31
# File 'lib/slimi/filters/base.rb', line 29

def on_slimi_output(escape, code, expression)
  [:slimi, :output, escape, code, compile(expression)]
end

#on_slimi_position(begin_, end_, expression) ⇒ Array

Parameters:

  • begin_ (Integer)
  • end_ (Integer)
  • expression (Array)

Returns:

  • (Array)


37
38
39
# File 'lib/slimi/filters/base.rb', line 37

def on_slimi_position(begin_, end_, expression)
  [:slimi, :position, begin_, end_, compile(expression)]
end

#on_slimi_text(type, expression) ⇒ Array

Parameters:

  • type (String)
  • expression (Array)

Returns:

  • (Array)


44
45
46
# File 'lib/slimi/filters/base.rb', line 44

def on_slimi_text(type, expression)
  [:slimi, :text, type, compile(expression)]
end