Class: Ro::HTML
Constant Summary
ActiveSupport::SafeBuffer::UNSAFE_STRING_METHODS
Instance Method Summary
collapse
#%, #+, #[], #clone_empty, #concat, #encode_with, #html_safe?, #initialize_copy, #prepend, #safe_concat, #to_param, #to_s
Methods inherited from String
#html_safe
Constructor Details
#initialize(*args, **kws, &block) ⇒ HTML
5
6
7
8
9
|
# File 'lib/ro/html.rb', line 5
def initialize(*args, **kws, &block)
self.front_matter = kws.fetch(:front_matter){ {} }
super(args.join)
end
|
Instance Method Details
#attributes ⇒ Object
19
20
21
|
# File 'lib/ro/html.rb', line 19
def attributes
front_matter
end
|
#front_matter ⇒ Object
11
12
13
|
# File 'lib/ro/html.rb', line 11
def front_matter
@front_matter ||= Map.new
end
|
#front_matter=(hash = {}) ⇒ Object
15
16
17
|
# File 'lib/ro/html.rb', line 15
def front_matter=(hash = {})
@front_matter = Map.for(hash)
end
|