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.



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

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.



85
86
87
# File 'lib/gm/notepad/table_entry.rb', line 85

def floor
  @floor
end

Instance Method Details

#include?(index) ⇒ Boolean

Returns:

  • (Boolean)


87
88
89
# File 'lib/gm/notepad/table_entry.rb', line 87

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