Class: Module

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

Instance Method Summary collapse

Instance Method Details

#first_namespaceObject



51
52
53
# File 'lib/lizarb.rb', line 51

def first_namespace
  to_s.rpartition('::')[0]
end

#last_namespaceObject



55
56
57
# File 'lib/lizarb.rb', line 55

def last_namespace
  to_s.rpartition('::')[-1]
end

#source_locationObject

“/path/to/liza.rb”, 1


33
34
35
# File 'lib/lizarb.rb', line 33

def source_location
  Array Object.const_source_location to_s
end

#source_location_pathObject

“/path/to/liza.rb”



38
39
40
41
42
# File 'lib/lizarb.rb', line 38

def source_location_path
  source_location[0]
rescue
  nil
end

#source_location_radicalObject

“/path/to/liza”



45
46
47
48
49
# File 'lib/lizarb.rb', line 45

def source_location_radical
  source_location_path[0..-4]
rescue
  nil
end