Module: Microstation::TagSetTrait
- Included in:
- Drawing
- Defined in:
- lib/microstation/tag_set_trait.rb
Instance Method Summary collapse
- #create_tagset(name, &block) ⇒ Object
- #create_tagset!(name, &block) ⇒ Object
- #find_tagset(name) ⇒ Object
- #remove_tagset(name) ⇒ Object
- #reset_tagsets ⇒ Object
- #tagset_names ⇒ Object
- #tagsets ⇒ Object
Instance Method Details
#create_tagset(name, &block) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/microstation/tag_set_trait.rb', line 16 def (name, &block) ts = .create(name) block.call ts if block ts end |
#create_tagset!(name, &block) ⇒ Object
23 24 25 26 |
# File 'lib/microstation/tag_set_trait.rb', line 23 def (name, &block) (name) (name, &block) end |
#find_tagset(name) ⇒ Object
33 34 35 |
# File 'lib/microstation/tag_set_trait.rb', line 33 def (name) [name] end |
#remove_tagset(name) ⇒ Object
28 29 30 31 |
# File 'lib/microstation/tag_set_trait.rb', line 28 def (name) .remove(name) end |
#reset_tagsets ⇒ Object
11 12 13 14 |
# File 'lib/microstation/tag_set_trait.rb', line 11 def = nil end |
#tagset_names ⇒ Object
7 8 9 |
# File 'lib/microstation/tag_set_trait.rb', line 7 def .map { |ts| ts.name } end |
#tagsets ⇒ Object
3 4 5 |
# File 'lib/microstation/tag_set_trait.rb', line 3 def ||= TagSets.new(self, ) end |