Class: Maven::Gwt::Layout
- Inherits:
-
Object
- Object
- Maven::Gwt::Layout
- Defined in:
- lib/maven/gwt/layout.rb
Instance Method Summary collapse
- #find_gwt_xml(path = java_root) ⇒ Object
-
#initialize(dir = '.') ⇒ Layout
constructor
A new instance of Layout.
- #java_root ⇒ Object
- #public_dir ⇒ Object
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_root ⇒ Object
29 30 31 |
# File 'lib/maven/gwt/layout.rb', line 29 def java_root @java_root ||= File.join( @dir, 'src', 'main', 'java' ) end |
#public_dir ⇒ Object
33 34 35 |
# File 'lib/maven/gwt/layout.rb', line 33 def public_dir @public_dir ||= File.join( @dir, 'public' ) end |