Class: Blur::Commands::CommandLUT
- Inherits:
-
Object
- Object
- Blur::Commands::CommandLUT
- Defined in:
- library/blur/script.rb
Overview
This is a command look-up-table with an autoincrementing index.
Instance Attribute Summary collapse
-
#commands ⇒ Object
Returns the value of attribute commands.
Instance Method Summary collapse
-
#<<(command) ⇒ Object
Inserts the command to the LUT.
-
#initialize ⇒ CommandLUT
constructor
A new instance of CommandLUT.
Constructor Details
#initialize ⇒ CommandLUT
Returns a new instance of CommandLUT.
9 10 11 12 |
# File 'library/blur/script.rb', line 9 def initialize @index = -1 @commands = {} end |
Instance Attribute Details
#commands ⇒ Object
Returns the value of attribute commands.
7 8 9 |
# File 'library/blur/script.rb', line 7 def commands @commands end |
Instance Method Details
#<<(command) ⇒ Object
Inserts the command to the LUT.
17 18 19 20 |
# File 'library/blur/script.rb', line 17 def << command @commands[command] = @index += 1 @index end |