Class: ContentTagHelper::Tag::CSS
- Inherits:
-
Object
- Object
- ContentTagHelper::Tag::CSS
- Defined in:
- lib/ecrire/app/helpers/content_tag_helper.rb
Instance Method Summary collapse
- #<<(name) ⇒ Object
- #empty? ⇒ Boolean
-
#initialize(css) ⇒ CSS
constructor
A new instance of CSS.
- #to_s ⇒ Object
Constructor Details
#initialize(css) ⇒ CSS
Returns a new instance of CSS.
72 73 74 75 76 77 78 |
# File 'lib/ecrire/app/helpers/content_tag_helper.rb', line 72 def initialize(css) if css.is_a? String @internals = css.split(' ') else @internals = css.to_a end end |
Instance Method Details
#<<(name) ⇒ Object
88 89 90 91 |
# File 'lib/ecrire/app/helpers/content_tag_helper.rb', line 88 def <<(name) @internals << name nil end |
#empty? ⇒ Boolean
84 85 86 |
# File 'lib/ecrire/app/helpers/content_tag_helper.rb', line 84 def empty? @internals.empty? end |
#to_s ⇒ Object
80 81 82 |
# File 'lib/ecrire/app/helpers/content_tag_helper.rb', line 80 def to_s @internals.uniq.join(' ').html_safe end |