Class: Gm::Notepad::TableEntry::OrLess

Inherits:
Base
  • Object
show all
Defined in:
lib/gm/notepad/table_entry.rb

Constant Summary

Constants inherited from Base

Base::NUMBER_RANGE_REGEXP

Instance Attribute Summary collapse

Attributes inherited from Base

#cells, #index

Instance Method Summary collapse

Methods inherited from Base

#<=>, #entry, #lookup, #lookup_range, #to_s

Constructor Details

#initialize(floor:, **kwargs) ⇒ OrLess

Returns a new instance of OrLess.



74
75
76
77
78
# File 'lib/gm/notepad/table_entry.rb', line 74

def initialize(floor:, **kwargs)
  super
  @floor = floor
  table.set_or_less_entry(self)
end

Instance Attribute Details

#floorObject (readonly)

Returns the value of attribute floor.



79
80
81
# File 'lib/gm/notepad/table_entry.rb', line 79

def floor
  @floor
end

Instance Method Details

#include?(index) ⇒ Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/gm/notepad/table_entry.rb', line 81

def include?(index)
  floor.to_i >= index.to_i
end