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.



5
6
7
8
9
# File 'lib/microstation/cell.rb', line 5

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



15
16
17
# File 'lib/microstation/cell.rb', line 15

def name
  ole_obj.Name
end

#shared_cell?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/microstation/cell.rb', line 11

def shared_cell?
  ole_obj.IsSharedCellElement
end

#text_elementsObject



20
21
22
23
24
25
# File 'lib/microstation/cell.rb', line 20

def text_elements
  return to_enum(:text_elements) unless block_given?
  each do |el|
    yield el if el.textual?
  end
end