module Bootstrap4RailsComponents::Bootstrap::Utilities::Alignable
Allow components to be right and center aligned
Public Instance Methods
center()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/utilities/alignable.rb, line 8 def center options.fetch(:center, false) end
right()
click to toggle source
# File lib/bootstrap4_rails_components/bootstrap/utilities/alignable.rb, line 12 def right options.fetch(:right, false) end
Private Instance Methods
css_classes()
click to toggle source
Calls superclass method
# File lib/bootstrap4_rails_components/bootstrap/utilities/alignable.rb, line 18 def css_classes [ super, ('justify-content-center' if center), ('justify-content-end' if right) ].join(' ').squish end
non_html_attribute_options()
click to toggle source
Calls superclass method
# File lib/bootstrap4_rails_components/bootstrap/utilities/alignable.rb, line 26 def non_html_attribute_options super.push(:right, :center) end