Class: Fet::Ui::Key

Inherits:
Object
  • Object
show all
Defined in:
lib/fet/ui/key.rb

Overview

Shows the current level’s key in the UI

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(level) ⇒ Key

Returns a new instance of Key.



9
10
11
# File 'lib/fet/ui/key.rb', line 9

def initialize(level)
  self.level = level
end

Instance Attribute Details

#levelObject

Returns the value of attribute level.



7
8
9
# File 'lib/fet/ui/key.rb', line 7

def level
  @level
end

Instance Method Details

#startObject



13
14
15
16
# File 'lib/fet/ui/key.rb', line 13

def start
  self.text ||= generate_text
  text.text = text_value
end