module ShowCode

Constants

VERSION

Public Class Methods

open(obj) click to toggle source
# File lib/show_code.rb, line 15
def self.open(obj)
  sol  = SourceLocation.new obj
  file = sol.file

  %x[gedit #{file}]
  if $?.success?
    'File has opened via gedit!'
  else
    'Sorry, cannot open the file.'
  end
end
parse(obj, opts = {}) click to toggle source
# File lib/show_code.rb, line 8
def self.parse(obj, opts = {})
  sol  = SourceLocation.new obj
  code = Code.new sol
  puts code.highlighted opts
  sol.method
end