Module: RgGen::Core::Base::ComponentLayerExtension::Register

Includes:
Common
Defined in:
lib/rggen/core/base/component_layer_extension.rb

Instance Method Summary collapse

Methods included from Common

#bit_field?, #register?, #register_block?, #register_file?, #root?

Instance Method Details

#bit_fieldsObject



150
151
152
# File 'lib/rggen/core/base/component_layer_extension.rb', line 150

def bit_fields
  children
end

#block_or_fileObject



146
147
148
# File 'lib/rggen/core/base/component_layer_extension.rb', line 146

def block_or_file
  parent
end

#register_blockObject



134
135
136
# File 'lib/rggen/core/base/component_layer_extension.rb', line 134

def register_block
  parent.register_block? && parent || parent.register_block
end

#register_fileObject



138
139
140
# File 'lib/rggen/core/base/component_layer_extension.rb', line 138

def register_file
  parent.register_file? && parent || nil
end

#register_filesObject



142
143
144
# File 'lib/rggen/core/base/component_layer_extension.rb', line 142

def register_files
  ancestors.select(&:register_file?)
end

#rootObject



130
131
132
# File 'lib/rggen/core/base/component_layer_extension.rb', line 130

def root
  parent.root
end