class Microstation::PropertyHandler
Attributes
ole_obj[R]
Public Class Methods
new(ole)
click to toggle source
# File lib/microstation/property_handler.rb, line 7 def initialize(ole) @ole_obj = ole end
Public Instance Methods
[](property)
click to toggle source
# File lib/microstation/property_handler.rb, line 16 def [](property) return unless has_property?(property) ole_obj.GetValue end
[]=(property,value)
click to toggle source
# File lib/microstation/property_handler.rb, line 28 def []=(property,value) return unless has_property?(property) ole_obj.SetValue(value) end
get_property_as_point3d(property)
click to toggle source
# File lib/microstation/property_handler.rb, line 21 def get_property_as_point3d(property) return unless has_property?(property) ole_pt = ole_obj.GetValueAsPoint3d Point3d.new(ole_pt) end
has_property?(value)
click to toggle source
# File lib/microstation/property_handler.rb, line 11 def has_property?(value) prop = ole_obj.SelectByAccessString(value) !!(prop) end
property_names() { |e| ... }
click to toggle source
# File lib/microstation/property_handler.rb, line 33 def property_names names = ole_obj.GetAccessStrings result = [] names.each do |e| if block_given? yield e else result << e end end result unless block_given? end