Class: Autocad::AttributeReference
- Inherits:
-
Element
- Object
- Element
- Autocad::AttributeReference
show all
- Defined in:
- lib/autocad/block_reference.rb
Instance Attribute Summary
Attributes inherited from Element
#acad_type, #app, #ole_obj, #original
Instance Method Summary
collapse
Methods inherited from Element
#[], #app_ole_obj, #clone, convert_item, #delete, #do_update, #each_complex, #get_property_handler, #in_cell?, #initialize, #method_missing, #move, #move_ole, #move_x, #move_y, #ole_cell, ole_object?, #property_handler, #redraw, #update, #updated?
#autocad_type, #block_reference?, #bounds, #cell?, #def, #drawing, #explode, #graphical?, #has_tags?, #highlight, #id_from_record, #line?, #model, #parent, #pviewport?, #select, #text?, #to_ole, #visible?
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Autocad::Element
Instance Method Details
#inspect ⇒ Object
223
224
225
|
# File 'lib/autocad/block_reference.rb', line 223
def inspect
"<Attribute #{key}: #{value}>"
end
|
#key ⇒ Object
211
212
213
|
# File 'lib/autocad/block_reference.rb', line 211
def key
@ole_obj.TagString
end
|
#mtext? ⇒ Boolean
191
192
193
|
# File 'lib/autocad/block_reference.rb', line 191
def mtext?
ole_obj.MTextAttribute
end
|
#read_ole(value) ⇒ Object
203
204
205
206
207
208
209
|
# File 'lib/autocad/block_reference.rb', line 203
def read_ole(value)
if mtext?
@ole_obj.MTextAttributeContent
else
@ole_obj.TextString
end
end
|
#value ⇒ Object
215
216
217
218
219
220
221
|
# File 'lib/autocad/block_reference.rb', line 215
def value
if mtext?
@ole_obj.MTextAttributeContent
else
@ole_obj.TextString
end
end
|
#write_ole(value) ⇒ Object
195
196
197
198
199
200
201
|
# File 'lib/autocad/block_reference.rb', line 195
def write_ole(value)
if mtext?
@ole_obj.MTextAttributeContent = value
else
@ole_obj.TextString = value
end
end
|