Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fixed typos in code.rb #10

Closed
wants to merge 1 commit into from

2 participants

@os97673

As promised here is a pull request which fixes several typos in code.rb

@trans
Owner

Thank you! I had to merge these fixes in by hand b/c I created a merge conflict for another PR, but they are in there now.

@trans trans closed this
@os97673 os97673 deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 29, 2012
  1. @os97673

    Fixed typos in code.rb

    os97673 authored
This page is out of date. Refresh to see the latest.
Showing with 10 additions and 10 deletions.
  1. +10 −10 lib/ansi/code.rb
View
20 lib/ansi/code.rb
@@ -11,7 +11,7 @@ module ANSI
require 'ansi/constants'
- # Global variialbe can be used to prevent ANSI codes
+ # Global varialbe can be used to prevent ANSI codes
# from being used in ANSI's methods that do so to string.
#
# NOTE: This has no effect of methods that return ANSI codes.
@@ -22,7 +22,7 @@ module ANSI
# ANSI Codes
#
# Ansi::Code module makes it very easy to use ANSI codes.
- # These are esspecially nice for beautifying shell output.
+ # These are especially nice for beautifying shell output.
#
# Ansi::Code.red + "Hello" + Ansi::Code.blue + "World"
# => "\e[31mHello\e[34mWorld"
@@ -165,10 +165,10 @@ def method_missing(code, *args, &blk)
end
# TODO: How to deal with position codes when $ansi is false?
- # Should we reaise an error or just not push the codes?
+ # Should we raise an error or just not push the codes?
# For now, we will leave this it as is.
- # Like +move+ but returns to original positon after
+ # Like +move+ but returns to original position after
# yielding the block.
def display(line, column=0) #:yield:
result = "\e[s"
@@ -188,22 +188,22 @@ def move(line, column=0)
"\e[#{line.to_i};#{column.to_i}H"
end
- # Move cursor up a specificed number of spaces.
+ # Move cursor up a specified number of spaces.
def up(spaces=1)
"\e[#{spaces.to_i}A"
end
- # Move cursor down a specificed number of spaces.
+ # Move cursor down a specified number of spaces.
def down(spaces=1)
"\e[#{spaces.to_i}B"
end
- # Move cursor left a specificed number of spaces.
+ # Move cursor left a specified number of spaces.
def left(spaces=1)
"\e[#{spaces.to_i}D"
end
- # Move cursor right a specificed number of spaces.
+ # Move cursor right a specified number of spaces.
def right(spaces=1)
"\e[#{spaces.to_i}C"
end
@@ -260,7 +260,7 @@ def unansi(string=nil) #:yield:
# Alias for #ansi method.
#
# @deprecated
- # Here for backward scompatibility.
+ # Here for backward compatibility.
alias_method :style, :ansi
# Alias for #unansi method.
@@ -285,7 +285,7 @@ def unansi(string=nil) #:yield:
# Also resolves :random and :on_random.
#
# @param codes [Array<Symbol,Integer]
- # Symbols or integers to covnert to ANSI code.
+ # Symbols or integers to convert to ANSI code.
#
# @return [String] ANSI code
def code(*codes)
Something went wrong with that request. Please try again.