Class: TaggableString

Inherits:
String
  • Object
show all
Includes:
Selectable::Object
Defined in:
lib/selectable.rb

Instance Attribute Summary

Attributes included from Selectable::Object

#tags

Instance Method Summary collapse

Methods included from Selectable::Object

#add_tags, #add_tags_quick, #init_tags!, #remove_tags, #tag_values

Constructor Details

#initialize(str, tags = {}) ⇒ TaggableString

Returns a new instance of TaggableString.



90
91
92
93
# File 'lib/selectable.rb', line 90

def initialize(str, tags={})
  super(str)
  add_tags tags unless tags.empty?
end