Method: Bootstrap4Helper::Spinner#to_s

Defined in:
lib/bootstrap4_helper/spinner.rb

#to_sString

String representation of the object.

Returns:

  • (String)


31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/bootstrap4_helper/spinner.rb', line 31

def to_s
  (
    :span,
    id:    @id,
    class: "spinner-#{@type} #{@class}",
    role:  'status',
    aria:  { hidden: true },
    data:  @data
  ) do
     :span, 'Loading', class: 'sr-only'
  end
end