Class: Sablon::Content::HTML

Inherits:
Struct
  • Object
show all
Includes:
Sablon::Content
Defined in:
lib/sablon/content.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Sablon::Content

make, register, remove, wrap

Constructor Details

#initialize(html) ⇒ HTML

Returns a new instance of HTML.



102
103
104
105
106
# File 'lib/sablon/content.rb', line 102

def initialize(html)
  converter = HTMLConverter.new
  word_ml = Sablon.content(:word_ml, converter.process(html))
  super word_ml
end

Instance Attribute Details

#word_mlObject

Returns the value of attribute word_ml

Returns:

  • (Object)

    the current value of word_ml



97
98
99
# File 'lib/sablon/content.rb', line 97

def word_ml
  @word_ml
end

Class Method Details

.idObject



99
# File 'lib/sablon/content.rb', line 99

def self.id; :html end

.wraps?(value) ⇒ Boolean

Returns:

  • (Boolean)


100
# File 'lib/sablon/content.rb', line 100

def self.wraps?(value) false end

Instance Method Details

#append_to(*args) ⇒ Object



108
109
110
# File 'lib/sablon/content.rb', line 108

def append_to(*args)
  word_ml.append_to(*args)
end