Class: Hone::MethodMap::MethodInfo

Inherits:
Data
  • Object
show all
Defined in:
lib/hone/method_map.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#class_nameObject (readonly)

Returns the value of attribute class_name

Returns:

  • (Object)

    the current value of class_name



9
10
11
# File 'lib/hone/method_map.rb', line 9

def class_name
  @class_name
end

#end_lineObject (readonly)

Returns the value of attribute end_line

Returns:

  • (Object)

    the current value of end_line



9
10
11
# File 'lib/hone/method_map.rb', line 9

def end_line
  @end_line
end

#fileObject (readonly)

Returns the value of attribute file

Returns:

  • (Object)

    the current value of file



9
10
11
# File 'lib/hone/method_map.rb', line 9

def file
  @file
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



9
10
11
# File 'lib/hone/method_map.rb', line 9

def name
  @name
end

#start_lineObject (readonly)

Returns the value of attribute start_line

Returns:

  • (Object)

    the current value of start_line



9
10
11
# File 'lib/hone/method_map.rb', line 9

def start_line
  @start_line
end

Instance Method Details

#contains_line?(line) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/hone/method_map.rb', line 10

def contains_line?(line)
  (start_line..end_line).cover?(line)
end

#qualified_nameObject



14
15
16
# File 'lib/hone/method_map.rb', line 14

def qualified_name
  class_name ? "#{class_name}##{name}" : name
end