Method: BOAST::CStruct#initialize
- Defined in:
- lib/BOAST/DataTypes.rb
#initialize(hash = {}) ⇒ CStruct
Returns a new instance of CStruct.
238 239 240 241 242 243 244 245 246 247 |
# File 'lib/BOAST/DataTypes.rb', line 238 def initialize(hash={}) @name = hash[:type_name] @members = {} @members_array = [] hash[:members].each { |m| mc = m.copy @members_array.push(mc) @members[mc.name] = mc } end |