Class: RgGen::RegisterMap::GenericMap::Cell

Inherits:
Object
  • Object
show all
Defined in:
lib/rggen/core_components/register_map/generic_map.rb

Defined Under Namespace

Classes: Position

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file, sheet, row, column) ⇒ Cell

Returns a new instance of Cell.



16
17
18
# File 'lib/rggen/core_components/register_map/generic_map.rb', line 16

def initialize(file, sheet, row, column)
  @position = Position.new(file, sheet, row, column)
end

Instance Attribute Details

#positionObject (readonly)

Returns the value of attribute position.



21
22
23
# File 'lib/rggen/core_components/register_map/generic_map.rb', line 21

def position
  @position
end

#valueObject

Returns the value of attribute value.



20
21
22
# File 'lib/rggen/core_components/register_map/generic_map.rb', line 20

def value
  @value
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


23
24
25
26
27
# File 'lib/rggen/core_components/register_map/generic_map.rb', line 23

def empty?
  return true if value.nil?
  return false unless value.respond_to?(:empty?)
  value.empty?
end