module Warbler::Traits
Traits are project configuration characteristics that correspond to the framework or project layout. Each trait corresponds to a class in Warbler::Traits that contains baked-in knowledge about the kind of project and how it should be packed into the jar or war file.
Attributes
traits[RW]
Public Class Methods
new()
click to toggle source
# File lib/warbler/traits.rb, line 20 def initialize @traits = auto_detect_traits end
Public Instance Methods
after_configure()
click to toggle source
# File lib/warbler/traits.rb, line 32 def after_configure trait_objects.each {|t| t.after_configure } end
auto_detect_traits()
click to toggle source
# File lib/warbler/traits.rb, line 24 def auto_detect_traits TraitsDependencyArray.new(Traits.constants.map {|t| Traits.const_get(t)}).tsort.select {|tc| tc.detect? } end
before_configure()
click to toggle source
# File lib/warbler/traits.rb, line 28 def before_configure trait_objects.each {|t| t.before_configure } end
dump_traits()
click to toggle source
# File lib/warbler/traits.rb, line 44 def dump_traits @trait_objects = nil @traits.collect! {|t| t.name } end
trait_objects()
click to toggle source
# File lib/warbler/traits.rb, line 36 def trait_objects @trait_objects ||= @traits.map {|klass| klass.new(self) } end
update_archive(jar)
click to toggle source
# File lib/warbler/traits.rb, line 40 def update_archive(jar) trait_objects.each {|t| t.update_archive(jar) } end