Sha256: fad84b7c3455c5d5e93166040511f5d666eba5150fcd1802937dbb9d9fe0980f
Contents?: true
Size: 624 Bytes
Versions: 27
Compression:
Stored size: 624 Bytes
Contents
module <%= @namespace %> class <%= @options[:name] %> include Origen::Model def initialize(options = {}) instantiate_registers(options) instantiate_sub_blocks(options) end def instantiate_registers(options = {}) end def instantiate_sub_blocks(options = {}) <% @options[:sub_blocks].each do |name, attrs| -%> <% if attrs[:instances] -%> sub_block :<%= name.underscore %>, instances: <%= attrs[:instances] %>, class_name: '<%= name.camelize %>' <% else -%> sub_block :<%= name.underscore %>, class_name: '<%= name.camelize %>' <% end -%> <% end -%> end end end
Version data entries
27 entries across 27 versions & 2 rubygems