Permalink
Browse files

Rename "Fixnum" to "Integer" in YARD docs

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
  • Loading branch information...
1 parent ad5bb4c commit 762374061e11ecc08d0013eb56b21bd249417261 @kyrylo kyrylo committed Jan 3, 2013
Showing with 21 additions and 21 deletions.
  1. +21 −21 lib/pry/code.rb
View
@@ -48,7 +48,7 @@ def from_file(filename, code_type = type_from_filename(filename))
#
# @param [::Method, UnboundMethod, Proc, Pry::Method] meth The method
# object.
- # @param [Fixnum, nil] start_line The line number to start on, or nil to
+ # @param [Integer, nil] start_line The line number to start on, or nil to
# use the method's original line numbers.
# @return [Code]
def from_method(meth, start_line=nil)
@@ -60,9 +60,9 @@ def from_method(meth, start_line=nil)
# Attempt to extract the source code for module (or class) `mod`.
#
# @param [Module, Class] mod The module (or class) of interest.
- # @param [Fixnum, nil] start_line The line number to start on, or nil to use the
+ # @param [Integer, nil] start_line The line number to start on, or nil to use the
# method's original line numbers.
- # @param [Fixnum] candidate_rank The module candidate (by rank)
+ # @param [Integer] candidate_rank The module candidate (by rank)
# to use (see `Pry::WrappedModule::Candidate` for more information).
# @return [Code]
def from_module(mod, start_line=nil, candidate_rank=0)
@@ -127,7 +127,7 @@ def get_abs_path(filename)
# empty `Code` object and then use `#push` to insert the lines.
#
# @param [Array<String>, String, IO] lines
- # @param [Fixnum?] start_line
+ # @param [Integer?] start_line
# @param [Symbol?] code_type
def initialize(lines=[], start_line=1, code_type=:ruby)
if lines.is_a? String
@@ -142,7 +142,7 @@ def initialize(lines=[], start_line=1, code_type=:ruby)
# line, unless specified otherwise.
#
# @param [String] line
- # @param [Fixnum?] line_num
+ # @param [Integer?] line_num
# @return [String] The inserted line.
def push(line, line_num=nil)
line_num = @lines.last.last + 1 unless line_num
@@ -165,8 +165,8 @@ def select(&blk)
# `Range` object or a first and last line number (inclusive). Negative
# indices count from the end of the array of lines.
#
- # @param [Range, Fixnum] start_line
- # @param [Fixnum?] end_line
+ # @param [Range, Integer] start_line
+ # @param [Integer?] end_line
# @return [Code]
def between(start_line, end_line=nil)
return self unless start_line
@@ -181,8 +181,8 @@ def between(start_line, end_line=nil)
# Take `num_lines` from `start_line`, forward or backwards
#
- # @param [Fixnum] start_line
- # @param [Fixnum] num_lines
+ # @param [Integer] start_line
+ # @param [Integer] num_lines
# @return [Code]
def take_lines(start_line, num_lines)
if start_line >= 0
@@ -198,8 +198,8 @@ def take_lines(start_line, num_lines)
# Remove all lines except for the `lines` up to and excluding `line_num`.
#
- # @param [Fixnum] line_num
- # @param [Fixnum] lines
+ # @param [Integer] line_num
+ # @param [Integer] lines
# @return [Code]
def before(line_num, lines=1)
return self unless line_num
@@ -212,8 +212,8 @@ def before(line_num, lines=1)
# Remove all lines except for the `lines` on either side of and including
# `line_num`.
#
- # @param [Fixnum] line_num
- # @param [Fixnum] lines
+ # @param [Integer] line_num
+ # @param [Integer] lines
# @return [Code]
def around(line_num, lines=1)
return self unless line_num
@@ -225,8 +225,8 @@ def around(line_num, lines=1)
# Remove all lines except for the `lines` after and excluding `line_num`.
#
- # @param [Fixnum] line_num
- # @param [Fixnum] lines
+ # @param [Integer] line_num
+ # @param [Integer] lines
# @return [Code]
def after(line_num, lines=1)
return self unless line_num
@@ -262,7 +262,7 @@ def with_line_numbers(y_n=true)
# Format output with a marker next to the given `line_num`, unless `line_num`
# is falsy.
#
- # @param [Fixnum?] line_num
+ # @param [Integer?] line_num
# @return [Code]
def with_marker(line_num=1)
alter do
@@ -274,7 +274,7 @@ def with_marker(line_num=1)
# Format output with the specified number of spaces in front of every line,
# unless `spaces` is falsy.
#
- # @param [Fixnum?] spaces
+ # @param [Integer?] spaces
# @return [Code]
def with_indentation(spaces=0)
alter do
@@ -302,23 +302,23 @@ def to_s
# Get the comment that describes the expression on the given line number.
#
- # @param [Fixnum] line_number (1-based)
+ # @param [Integer] line_number (1-based)
# @return [String] the code.
def comment_describing(line_number)
self.class.comment_describing(raw, line_number)
end
# Get the multiline expression that starts on the given line number.
#
- # @param [Fixnum] line_number (1-based)
+ # @param [Integer] line_number (1-based)
# @return [String] the code.
def expression_at(line_number, consume=0)
self.class.expression_at(raw, line_number, :consume => consume)
end
# Get the (approximate) Module.nesting at the give line number.
#
- # @param [Fixnum] line_number line number starting from 1
+ # @param [Integer] line_number line number starting from 1
# @param [Module] top_module the module in which this code exists
# @return [Array<Module>] a list of open modules.
def nesting_at(line_number, top_module=Object)
@@ -334,7 +334,7 @@ def raw
# Return the number of lines stored.
#
- # @return [Fixnum]
+ # @return [Integer]
def length
@lines ? @lines.length : 0
end

0 comments on commit 7623740

Please sign in to comment.