Class: Microstation::TagSet
- Inherits:
-
Object
- Object
- Microstation::TagSet
- Defined in:
- lib/microstation/tag_set.rb
Instance Attribute Summary collapse
-
#drawing ⇒ Object
readonly
Returns the value of attribute drawing.
-
#instances ⇒ Object
readonly
def find_instances_in_model(model) result = create_instances(model.scan_tags) instances = result result end.
-
#ole_obj ⇒ Object
readonly
Returns the value of attribute ole_obj.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #[](name) ⇒ Object
- #add_attribute(name, type, **options, &block) ⇒ Object
- #add_instance(array) ⇒ Object
- #attribute_names ⇒ Object
- #attributes ⇒ Object
- #close ⇒ Object
- #create_instance(id, elements, model) ⇒ Object
-
#initialize(drawing, ole) ⇒ TagSet
constructor
A new instance of TagSet.
- #name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(drawing, ole) ⇒ TagSet
Returns a new instance of TagSet.
247 248 249 250 251 |
# File 'lib/microstation/tag_set.rb', line 247 def initialize(drawing,ole) @drawing = drawing @ole_obj = ole @instances = nil end |
Instance Attribute Details
#drawing ⇒ Object (readonly)
Returns the value of attribute drawing.
245 246 247 |
# File 'lib/microstation/tag_set.rb', line 245 def drawing @drawing end |
#instances ⇒ Object (readonly)
def find_instances_in_model(model)
result = create_instances(model.)
instances[model.name] = result
result
end
295 296 297 |
# File 'lib/microstation/tag_set.rb', line 295 def instances @instances end |
#ole_obj ⇒ Object (readonly)
Returns the value of attribute ole_obj.
243 244 245 |
# File 'lib/microstation/tag_set.rb', line 243 def ole_obj @ole_obj end |
Instance Method Details
#==(other) ⇒ Object
329 330 331 |
# File 'lib/microstation/tag_set.rb', line 329 def ==(other) @ole_obj == other.ole_obj end |
#[](name) ⇒ Object
341 342 343 |
# File 'lib/microstation/tag_set.rb', line 341 def [](name) definition[name] end |
#add_attribute(name, type, **options, &block) ⇒ Object
253 254 255 |
# File 'lib/microstation/tag_set.rb', line 253 def add_attribute(name,type,**, &block) ts = definition.add_attribute(name,type,**, &block) end |
#add_instance(array) ⇒ Object
263 264 265 |
# File 'lib/microstation/tag_set.rb', line 263 def add_instance(array) @instances << TS::Instance.new(self,array) end |
#attribute_names ⇒ Object
333 334 335 |
# File 'lib/microstation/tag_set.rb', line 333 def attribute_names definition.attribute_names end |
#attributes ⇒ Object
337 338 339 |
# File 'lib/microstation/tag_set.rb', line 337 def attributes definition.attributes end |
#close ⇒ Object
317 318 319 |
# File 'lib/microstation/tag_set.rb', line 317 def close @ole_obj = nil end |
#create_instance(id, elements, model) ⇒ Object
267 268 269 270 271 272 273 274 |
# File 'lib/microstation/tag_set.rb', line 267 def create_instance(base_element_id , , model ) if @instaces.nil? @instance = [] ti = TS::Instances.new(self, base_element_id, , model) @instances << ti ti end end |
#name ⇒ Object
321 322 323 |
# File 'lib/microstation/tag_set.rb', line 321 def name @ole_obj.name end |
#to_s ⇒ Object
325 326 327 |
# File 'lib/microstation/tag_set.rb', line 325 def to_s "TagSet: #{name}" end |