Module: Mark
- Defined in:
- lib/mark.rb,
lib/mark/jump.rb,
lib/mark/main.rb,
lib/mark/error.rb,
lib/mark/label.rb
Constant Summary collapse
- VERSION =
'0.0.1'
Class Method Summary collapse
- .error!(command, *argv) ⇒ Object
- .jump(label, *argv) ⇒ Object
- .label(label, *argv) ⇒ Object
- .process(command, *argv) ⇒ Object
Class Method Details
.error!(command, *argv) ⇒ Object
4 5 6 |
# File 'lib/mark/error.rb', line 4 def self.error!(command, *argv) puts "Command \"#{command}\" not found: [#{command} #{argv.join(' ')}]" end |
.jump(label, *argv) ⇒ Object
4 5 6 |
# File 'lib/mark/jump.rb', line 4 def self.jump(label, *argv) puts "Jumping to #{label}" end |
.label(label, *argv) ⇒ Object
4 5 6 |
# File 'lib/mark/label.rb', line 4 def self.label(label, *argv) puts "Saving #{label}" end |
.process(command, *argv) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/mark/main.rb', line 4 def self.process(command, *argv) case command when 'label' self.label(*argv) when 'jump' self.jump(*argv) else self.error!(command, *argv) end end |