Class: PM::CodeKey
- Inherits:
-
Object
- Object
- PM::CodeKey
- Defined in:
- lib/patchmaster/code_key.rb
Overview
A CodeKey holds a CodeChunk and remembers what key it is assigned to.
Instance Attribute Summary collapse
-
#code_chunk ⇒ Object
Returns the value of attribute code_chunk.
-
#key ⇒ Object
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, code_chunk) ⇒ CodeKey
constructor
A new instance of CodeKey.
- #run ⇒ Object
Constructor Details
#initialize(key, code_chunk) ⇒ CodeKey
Returns a new instance of CodeKey.
8 9 10 |
# File 'lib/patchmaster/code_key.rb', line 8 def initialize(key, code_chunk) @key, @code_chunk = key, code_chunk end |
Instance Attribute Details
#code_chunk ⇒ Object
Returns the value of attribute code_chunk.
6 7 8 |
# File 'lib/patchmaster/code_key.rb', line 6 def code_chunk @code_chunk end |
#key ⇒ Object
Returns the value of attribute key.
6 7 8 |
# File 'lib/patchmaster/code_key.rb', line 6 def key @key end |
Instance Method Details
#run ⇒ Object
12 13 14 |
# File 'lib/patchmaster/code_key.rb', line 12 def run @code_chunk.run end |