Class: ImageNode
- Inherits:
-
Object
- Object
- ImageNode
- Defined in:
- lib/textile/nodes.rb
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(src) ⇒ ImageNode
constructor
A new instance of ImageNode.
-
#transform_src ⇒ Object
Hook for booru monkeypatch.
Constructor Details
#initialize(src) ⇒ ImageNode
Returns a new instance of ImageNode.
63 64 65 |
# File 'lib/textile/nodes.rb', line 63 def initialize(src) @src = src end |
Instance Method Details
#build ⇒ Object
67 68 69 70 71 72 73 |
# File 'lib/textile/nodes.rb', line 67 def build output = [] output << '<img src="' output << transform_src output << '"/>' output.join('') end |
#transform_src ⇒ Object
Hook for booru monkeypatch
76 77 78 |
# File 'lib/textile/nodes.rb', line 76 def transform_src CGI.escapeHTML(@src) end |