Sha256: 79507ba4a54312321456a91e6031f9231dc2a1f5586727aae288af2ddbd6bcf2
Contents?: true
Size: 643 Bytes
Versions: 15
Compression:
Stored size: 643 Bytes
Contents
require 'rexml/document' module AsProject class EclipseProject < Project def initialize(dir=nil) super(dir) @project_name = '' @file_path = nil if(!dir.nil?) self.file_path = File.join(dir, '.project') end end def file_path=(path) @file_path = path file = File.open(path, 'r') parse(file.read) file.close end def parse(str) xml = REXML::Document.new(str) @project_name = REXML::XPath.first(xml, '//projectDescription/name').text end def file_path return @file_path end end end
Version data entries
15 entries across 15 versions & 1 rubygems