Class: Maven::Gwt::Layout

Inherits:
Object
  • Object
show all
Defined in:
lib/maven/gwt/layout.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir = '.') ⇒ Layout

Returns a new instance of Layout.



25
26
27
# File 'lib/maven/gwt/layout.rb', line 25

def initialize( dir = '.' )
  @dir = dir
end

Instance Method Details

#find_gwt_xml(path = java_root) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/maven/gwt/layout.rb', line 37

def find_gwt_xml( path = java_root )
  Dir[ File.join( path, "*" ) ].each do |path|
    if File.directory?( path )
      result = find_gwt_xml( path )
      return result if result
    elsif File.file?( path )
      return path if (path =~ /.gwt.xml$/) && ! (path =~ /Development.gwt.xml$/)
    end
  end
  nil
end

#java_rootObject



29
30
31
# File 'lib/maven/gwt/layout.rb', line 29

def java_root
  @java_root ||= File.join( @dir, 'src', 'main', 'java' )
end

#public_dirObject



33
34
35
# File 'lib/maven/gwt/layout.rb', line 33

def public_dir
  @public_dir ||= File.join( @dir, 'public' )
end