Archived
1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
cli-old/lib/events.rb
2017-07-26 08:07:36 +00:00

32 lines
672 B
Ruby

# frozen_string_literal: true
module Events
module Window
class Left; end
class Right; end
end
module Text
class Enter; end
class Left; end
class Right; end
class Up; end
class Down; end
class Home; end
class End; end
class Backspace; end
class Delete; end
class Putc
attr_reader :char
def initialize(char)
raise TypeError, "expected char to be a #{String}" unless char.is_a? String
raise ArgumentError, 'expected char to have length 1' unless char.length == 1
@char = char.frozen? ? char : char.dup.freeze
end
end
end
end