Module: IronNails::Wpf
- Defined in:
- lib/ironnails/wpf.rb
Defined Under Namespace
Modules: Builders
Class Method Summary collapse
Class Method Details
.build(klass, args = {}, &b) ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/ironnails/wpf.rb', line 65 def self.build(klass, args = {}, &b) obj = klass.new obj.instance_variable_set(:@___name_collector_, {}) args.each_pair do |k, v| if k == :name obj.name_collector[v] = obj end obj.send :"#{k.to_s}=", v end obj.instance_eval(&b) if b != nil obj end |