Class: Sevgi::Graphics::Content
- Inherits:
-
Object
- Object
- Sevgi::Graphics::Content
show all
- Defined in:
- lib/sevgi/graphics/auxilary/content.rb
Defined Under Namespace
Classes: CData, CSS, Encoded, Verbatim
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(content) ⇒ Content
Returns a new instance of Content.
8
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 8
def initialize(content) = @content = content
|
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
6
7
8
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 6
def content
@content
end
|
Class Method Details
.cdata ⇒ Object
15
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 15
def cdata(...) = CData.new(...)
|
.css ⇒ Object
17
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 17
def css(...) = CSS.new(...)
|
.encoded ⇒ Object
19
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 19
def encoded(...) = Encoded.new(...)
|
.text(contents) ⇒ Object
21
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 21
def text(contents) = Array(contents).map(&:to_s).join("\n")
|
.verbatim ⇒ Object
23
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 23
def verbatim(...) = Verbatim.new(...)
|
Instance Method Details
#render(renderer, depth) ⇒ Object
10
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 10
def render(renderer, depth) = raise(NoMethodError, "#{self.class}#render must be implemented")
|
#to_s ⇒ Object
12
|
# File 'lib/sevgi/graphics/auxilary/content.rb', line 12
def to_s = content.to_s
|