Class: Fu::Mustache

Inherits:
Object
  • Object
show all
Defined in:
lib/fu/mustache.rb

Constant Summary collapse

SELF_CLOSING_TAGS =
%w(meta img link br hr input area param col base)
BLOCK_ACTIONS =

<- Mustache actions that take a block

%w(# ^)
NO_SPACE_CHARS =
/[{}<>]/

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ Mustache

<- Characters that do not need to be separated by a space

when joining elements (e.g. "<p>!</p>", not "<p> ! </p>")


13
14
15
# File 'lib/fu/mustache.rb', line 13

def initialize(root)
  @mustache = flatten(render_children(root))
end

Instance Attribute Details

#mustacheObject (readonly)

Returns the value of attribute mustache.



7
8
9
# File 'lib/fu/mustache.rb', line 7

def mustache
  @mustache
end