Class: Microstation::Definer
- Inherits:
-
Object
- Object
- Microstation::Definer
- Defined in:
- lib/microstation/tag_set.rb
Instance Attribute Summary collapse
-
#tagset ⇒ Object
readonly
Returns the value of attribute tagset.
Instance Method Summary collapse
- #add_attribute(name, type, options = {}) {|td| ... } ⇒ Object
-
#initialize(tagset) ⇒ Definer
constructor
A new instance of Definer.
Constructor Details
#initialize(tagset) ⇒ Definer
88 89 90 |
# File 'lib/microstation/tag_set.rb', line 88 def initialize() @tagset = end |
Instance Attribute Details
#tagset ⇒ Object (readonly)
Returns the value of attribute tagset.
86 87 88 |
# File 'lib/microstation/tag_set.rb', line 86 def @tagset end |
Instance Method Details
#add_attribute(name, type, options = {}) {|td| ... } ⇒ Object
93 94 95 96 97 98 99 100 101 102 103 |
# File 'lib/microstation/tag_set.rb', line 93 def add_attribute(name,type, = {}) ole_td = create_ole_definition(name, type) td = TS::Attribute.new(ole_td) td.prompt = [:prompt] || name td.hidden = [:is_hidden] td.constant = [:is_constant] || false td.default = [:default] if [:default] #td.hidden = td.fetch(:is_hidden) yield td if block_given? td end |