Class: Microstation::Cell

Inherits:
Element
  • Object
show all
Defined in:
lib/microstation/cell.rb

Instance Attribute Summary

Attributes inherited from Element

#app, #ole_obj, #original

Instance Method Summary collapse

Methods inherited from Element

#[], #app_ole_obj, convert_item, #do_update, #each, #each_cell, #each_complex, #get_property_handler, #in_cell?, #method_missing, #ole_cell, ole_object?, #property_handler, #read_ole, #redraw, #update, #updated?, #write_ole

Methods included from ElementTrait

#cell?, #complex?, #graphical?, #has_tags?, #id_from_record, #line?, #microstation_id, #microstation_type, #model, #parent, #select, #text?, #text_node?, #textual?, #to_ole

Constructor Details

#initialize(*args) ⇒ Cell

Returns a new instance of Cell.



3
4
5
6
7
# File 'lib/microstation/cell.rb', line 3

def initialize(*args)
  super(*args)
  @should_replace = false
  @replacement = nil
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Microstation::Element

Instance Method Details

#nameObject



13
14
15
# File 'lib/microstation/cell.rb', line 13

def name
  ole_obj.Name
end

#shared_cell?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/microstation/cell.rb', line 9

def shared_cell?
  ole_obj.IsSharedCellElement
end

#text_elementsObject



17
18
19
20
21
22
23
# File 'lib/microstation/cell.rb', line 17

def text_elements
  return to_enum(:text_elements) unless block_given?

  each do |el|
    yield el if el.textual?
  end
end