Class: Microstation::TaggedElement
- Inherits:
-
Object
- Object
- Microstation::TaggedElement
- Defined in:
- lib/microstation/tagged_element.rb
Defined Under Namespace
Classes: Set
Instance Method Summary collapse
- #add_tagset(name, elements) ⇒ Object
- #get_tagset(name) ⇒ Object
-
#initialize(ole = nil) ⇒ TaggedElement
constructor
A new instance of TaggedElement.
Constructor Details
#initialize(ole = nil) ⇒ TaggedElement
Returns a new instance of TaggedElement.
77 78 79 80 |
# File 'lib/microstation/tagged_element.rb', line 77 def initialize(ole = nil) @ole_obj = ole @tag_sets = [] end |
Instance Method Details
#add_tagset(name, elements) ⇒ Object
82 83 84 85 86 87 |
# File 'lib/microstation/tagged_element.rb', line 82 def (name, elements) ts = TaggedElement::Set.new(name, self) ts.elements = elements @tag_sets << ts ts end |
#get_tagset(name) ⇒ Object
89 90 91 |
# File 'lib/microstation/tagged_element.rb', line 89 def (name) @tagsets.find { |ts| ts.name == name } end |