Class: Arbre::HTML::ClassList

Inherits:
Set
  • Object
show all
Defined in:
lib/active_admin/arbre/class_list.rb

Overview

Holds a set of classes

Instance Method Summary collapse

Instance Method Details

#add(class_names) ⇒ Object Also known as: <<



9
10
11
12
13
14
# File 'lib/active_admin/arbre/class_list.rb', line 9

def add(class_names)
  class_names.to_s.split(" ").each do |class_name|
    super(class_name)
  end
  self
end

#to_htmlObject



21
22
23
# File 'lib/active_admin/arbre/class_list.rb', line 21

def to_html
  to_a.join(" ")
end

#to_sObject



17
18
19
# File 'lib/active_admin/arbre/class_list.rb', line 17

def to_s
  to_html
end