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

Version Path
origen-0.44.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.43.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.42.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.42.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.42.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.41.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.41.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.41.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.40.2 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.40.1 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen-0.40.0 origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.2.0 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.1.4 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.1.3 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.1.2 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.1.1 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.1.0 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.0.1 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-1.0.0 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb
origen_app_generators-0.4.0 templates/app_generators/test_engineering/stand_alone_application/lib/ip_block.rb