Class: NameDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/RiManager.rb

Constant Summary collapse

CLASS =
0
INSTANCE_METHOD =
1
CLASS_METHOD =
2

Instance Method Summary collapse

Instance Method Details

#to_sObject



23
24
25
26
27
28
29
30
31
# File 'lib/RiManager.rb', line 23

def to_s
  str = ""
  str << @class_names.join("::")
  if @method_name && str != ""
    str << (@is_class_method ? "::" : "#")
  end
  str << @method_name if @method_name
  str
end

#typeObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/RiManager.rb', line 9

def type
  @method_name ||= false
  @is_class_method ||= false
  if @method_name
    if @is_class_method
      CLASS_METHOD
    else
      INSTANCE_METHOD
    end
  else
    CLASS
  end
end