Class: TerminalCalendar::Selection::NullCell

Inherits:
Cell
  • Object
show all
Defined in:
lib/terminal_calendar/selection/null_cell.rb

Instance Attribute Summary

Attributes inherited from Cell

#selected_style, #underlying_object

Instance Method Summary collapse

Methods inherited from Cell

build, #method_missing, #respond_to_missing?

Constructor Details

#initializeNullCell

Returns a new instance of NullCell.



7
8
9
# File 'lib/terminal_calendar/selection/null_cell.rb', line 7

def initialize
  super(nil)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class TerminalCalendar::Selection::Cell

Instance Method Details

#null?true

Checks if the object is null.

Returns:

  • (true)

    Returns true.



18
19
20
# File 'lib/terminal_calendar/selection/null_cell.rb', line 18

def null?
  true
end

#renderObject



11
12
13
# File 'lib/terminal_calendar/selection/null_cell.rb', line 11

def render
  '  '
end

#selectedfalse

Returns false.

Returns:

  • (false)

    Returns false.



23
24
25
# File 'lib/terminal_calendar/selection/null_cell.rb', line 23

def selected
  false
end

#toggle_selected!Object



27
28
29
# File 'lib/terminal_calendar/selection/null_cell.rb', line 27

def toggle_selected!
  false
end