diff --git a/sig/tty/cursor.rbs b/sig/tty/cursor.rbs new file mode 100644 index 0000000..53c43e4 --- /dev/null +++ b/sig/tty/cursor.rbs @@ -0,0 +1,54 @@ +module TTY + module Cursor + def self.backward: (Integer n) -> String + alias self.cursor_backward self.backward + + def self.column: (Integer n) -> String + + def self.clear_char: (?Integer? n) -> String + + def self.clear_line: () -> String + + def self.clear_line_after: () -> String + + def self.clear_line_before: () -> String + + def self.clear_lines: (Integer n, ?Symbol? direction) -> String + alias self.clear_rows self.clear_lines + + def self.clear_screen: () -> String + + def self.clear_screen_down: () -> String + + def self.clear_screen_up: () -> String + + def self.current: () -> String + + def self.down: (Integer n) -> String + alias self.cursor_down self.down + + def self.forward: (Integer n) -> String + alias self.cursor_forward self.forward + + def self.move: (Integer x, Integer y) -> String + + def self.move_to: (Integer x, Integer y) -> String + + def self.next_line: () -> String + + def self.prev_line: () -> String + + def self.restore: () -> String + + def self.row: (Integer n) -> String + + def self.save: () -> String + + def self.scroll_down: () -> String + + def self.scroll_up: () -> String + + def self.up: (Integer n) -> String + alias self.cursor_up self.up + end +end diff --git a/tty-cursor.gemspec b/tty-cursor.gemspec index 0b9a4ac..a0bd344 100644 --- a/tty-cursor.gemspec +++ b/tty-cursor.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| "source_code_uri" => "https://github.com/piotrmurach/tty-cursor" } end - spec.files = Dir["lib/**/*", "README.md", "CHANGELOG.md", "LICENSE.txt"] + spec.files = Dir["lib/**/*", "sig/**/*", "README.md", "CHANGELOG.md", "LICENSE.txt"] spec.extra_rdoc_files = ["README.md", "CHANGELOG.md"] spec.bindir = "exe" spec.require_paths = ["lib"]