Class: ShowPastGenerationAction

Inherits:
MoveAction
  • Object
show all
Defined in:
lib/life_game_viewer/view/actions.rb

Instance Method Summary collapse

Methods inherited from MoveAction

#actionPerformed

Constructor Details

#initialize(table_model) ⇒ ShowPastGenerationAction

Returns a new instance of ShowPastGenerationAction.



50
51
52
# File 'lib/life_game_viewer/view/actions.rb', line 50

def initialize(table_model)
  super(table_model)  # caption implemented by subclasses
end

Instance Method Details

#should_be_enabled?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/life_game_viewer/view/actions.rb', line 54

def should_be_enabled?
  ! @table_model.at_first_generation?
end