Module: WrapIt::TextContainer::ClassMethods
- Defined in:
- lib/wrap_it/text_container.rb
Instance Method Summary collapse
-
#html_safe(value = nil) ⇒ Boolean
Sets whether text from arguments are html-safe.
-
#html_safe? ⇒ Boolean
Retrieves whether text from attributes are html-safe.
-
#text_in_block(value = nil) ⇒ Boolean
Sets priotiy of text source.
-
#text_in_block? ⇒ Boolean
Retrieves block priority.
Instance Method Details
#html_safe(value = nil) ⇒ Boolean
Sets whether text from arguments are html-safe
84 85 86 87 88 89 90 91 |
# File 'lib/wrap_it/text_container.rb', line 84 def html_safe(value = nil) if value.nil? @html_safe.nil? && @html_safe = true @html_safe else @html_safe = value == true end end |
#html_safe? ⇒ Boolean
Retrieves whether text from attributes are html-safe
97 98 99 100 |
# File 'lib/wrap_it/text_container.rb', line 97 def html_safe? @html_safe.nil? && @html_safe = true @html_safe end |
#text_in_block(value = nil) ⇒ Boolean
Sets priotiy of text source
58 59 60 61 62 63 64 65 |
# File 'lib/wrap_it/text_container.rb', line 58 def text_in_block(value = nil) if value.nil? @text_in_block.nil? && @text_in_block = true @text_in_block else @text_in_block = value == true end end |
#text_in_block? ⇒ Boolean
Retrieves block priority
71 72 73 74 |
# File 'lib/wrap_it/text_container.rb', line 71 def text_in_block? @text_in_block.nil? && @text_in_block = true @text_in_block end |