Exception: Fortitude::Errors::DuplicateId

Inherits:
Base
  • Object
show all
Defined in:
lib/fortitude/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(widget, id, already_used_widget, already_used_tag_name, tag_name) ⇒ DuplicateId

Returns a new instance of DuplicateId.



89
90
91
92
93
94
95
96
# File 'lib/fortitude/errors.rb', line 89

def initialize(widget, id, already_used_widget, already_used_tag_name, tag_name)
  super(%{The widget #{widget} tried to use a DOM ID, '#{id}', that has already been used. It was originally used on a <#{already_used_tag_name}> tag within widget #{already_used_widget}, and is now trying to be used on a <#{tag_name}> tag.})
  @widget = widget
  @id = id
  @already_used_widget = already_used_widget
  @already_used_tag_name = already_used_tag_name
  @tag_name = tag_name
end

Instance Attribute Details

#already_used_tag_nameObject (readonly)

Returns the value of attribute already_used_tag_name.



87
88
89
# File 'lib/fortitude/errors.rb', line 87

def already_used_tag_name
  @already_used_tag_name
end

#already_used_widgetObject (readonly)

Returns the value of attribute already_used_widget.



87
88
89
# File 'lib/fortitude/errors.rb', line 87

def already_used_widget
  @already_used_widget
end

#idObject (readonly)

Returns the value of attribute id.



87
88
89
# File 'lib/fortitude/errors.rb', line 87

def id
  @id
end

#tag_nameObject (readonly)

Returns the value of attribute tag_name.



87
88
89
# File 'lib/fortitude/errors.rb', line 87

def tag_name
  @tag_name
end

#widgetObject (readonly)

Returns the value of attribute widget.



87
88
89
# File 'lib/fortitude/errors.rb', line 87

def widget
  @widget
end