Class Texy::CodeBlockElement
In: lib/texy/modules/block.rb
Parent: TextualElement

Html element pre + code

Methods

generate_tags   new  

Attributes

lang  [RW] 
type  [RW] 

Public Class methods

[Source]

# File lib/texy/modules/block.rb, line 174
        def initialize(texy)
            super
            self.tag = 'pre'
        end

Public Instance methods

[Source]

# File lib/texy/modules/block.rb, line 180
        def generate_tags(tags)
            super

            if tag # (rane) maybe !tag.empty?
                tags.each do |(t, attrs)|
                    if t == tag
                        attrs[:class] << lang

                        tags << [type, {}] if type # (rane) maybe !type.empty?
                        break
                    end
                end
            end
        end

[Validate]