class Object

Public Instance Methods

anchor_id() click to toggle source
# File lib/rggen/markdown/register/markdown.rb, line 5
       def anchor_id
  [register_block, *register_files, register]
    .map(&:name).join('-')
end
bit_field_printables() click to toggle source
# File lib/rggen/markdown/register/markdown.rb, line 31
def bit_field_printables
  @bit_field_printables ||= register.bit_fields.map(&:printables)
end
bit_field_table() click to toggle source
# File lib/rggen/markdown/register/markdown.rb, line 22
def bit_field_table
  column_names = bit_field_printables.first.keys
  rows =
    bit_field_printables
      .map(&:values)
      .map { |row| row.map { |cell| Array(cell).join("\n") } }
  table(column_names, rows)
end
register_block_printables() click to toggle source
# File lib/rggen/markdown/register_block/markdown.rb, line 23
def register_block_printables
  register_block.printables.except(:name).compact
end
register_printables() click to toggle source
# File lib/rggen/markdown/register/markdown.rb, line 18
def register_printables
  register.printables.except(:name, :layer_name).compact
end
register_table() click to toggle source
# File lib/rggen/markdown/register_block/markdown.rb, line 27
def register_table
  table([:name], table_rows)
end
table_row(register) click to toggle source
# File lib/rggen/markdown/register_block/markdown.rb, line 35
def table_row(register)
  name = register.printables[:layer_name]
  id = register.anchor_id
  [anchor_link(name, id)]
end
table_rows() click to toggle source
# File lib/rggen/markdown/register_block/markdown.rb, line 31
def table_rows
  register_block.registers.map(&method(:table_row))
end
title() click to toggle source
# File lib/rggen/markdown/register/markdown.rb, line 14
def title
  register.printables[:layer_name]
end