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 19
def initialize
  @traits = auto_detect_traits
end

Public Instance Methods

after_configure() click to toggle source
# File lib/warbler/traits.rb, line 31
def after_configure
  trait_objects.each {|t| t.after_configure }
end
auto_detect_traits() click to toggle source
# File lib/warbler/traits.rb, line 23
def auto_detect_traits
  Traits.constants.map {|t| Traits.const_get(t)}.select {|tc| tc.detect? }.sort
end
before_configure() click to toggle source
# File lib/warbler/traits.rb, line 27
def before_configure
  trait_objects.each {|t| t.before_configure }
end
dump_traits() click to toggle source
# File lib/warbler/traits.rb, line 43
def dump_traits
  @trait_objects = nil
  @traits.collect! {|t| t.name }
end
trait_objects() click to toggle source
# File lib/warbler/traits.rb, line 35
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 39
def update_archive(jar)
  trait_objects.each {|t| t.update_archive(jar) }
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.