Class: Gm::Notepad::TableEntry::OrMore

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(ceiling:, **kwargs) ⇒ OrMore

Returns a new instance of OrMore.



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

def initialize(ceiling:, **kwargs)
  super
  @ceiling = ceiling
  table.set_or_more_entry(self)
end

Instance Attribute Details

#ceilingObject (readonly)

Returns the value of attribute ceiling.



91
92
93
# File 'lib/gm/notepad/table_entry.rb', line 91

def ceiling
  @ceiling
end

Instance Method Details

#include?(index) ⇒ Boolean

Returns:

  • (Boolean)


93
94
95
# File 'lib/gm/notepad/table_entry.rb', line 93

def include?(index)
  ceiling.to_i <= index.to_i
end