class Tumblargh::Node::BlockStart
Public Instance Methods
matching_end()
click to toggle source
# File lib/tumblargh/node/block_start.rb, line 24 def matching_end "{/block:#{name}}" end
name()
click to toggle source
# File lib/tumblargh/node/block_start.rb, line 5 def name str = elements[1].text_value "#{str[0].upcase}#{str[1..str.size]}" end
options()
click to toggle source
# File lib/tumblargh/node/block_start.rb, line 10 def options arguments = elements[3] return {} if arguments.nil? || arguments.elements.nil? arguments.elements.inject({}) do |memo, node| nodes = node.elements.first.elements k = nodes[0].text_value v = nodes[3].text_value memo[k] = v memo end end
to_tree()
click to toggle source
# File lib/tumblargh/node/block_start.rb, line 28 def to_tree return [type, name, options] end