Class: RubyletDescriptor

Inherits:
Object
  • Object
show all
Extended by:
ParamAccessor
Includes:
CommonParams
Defined in:
lib/rubylet/war_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ParamAccessor

param_accessor

Methods included from CommonParams

#common_params, #gem

Constructor Details

#initialize(webapp) ⇒ RubyletDescriptor

Returns a new instance of RubyletDescriptor.



178
179
180
# File 'lib/rubylet/war_task.rb', line 178

def initialize(webapp)
  @webapp = webapp
end

Instance Attribute Details

#webappObject (readonly)

Returns the value of attribute webapp.



176
177
178
# File 'lib/rubylet/war_task.rb', line 176

def webapp
  @webapp
end

Instance Method Details

#call(w) ⇒ Object

Parameters:

  • w (WebappDescriptorBuilder)


183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/rubylet/war_task.rb', line 183

def call(w)
  w.servlet { |s|
    s.servlet_name name
    s.servlet_class java_servlet_class
    common_params do |key, value|
      s.init_param! key, value
    end
    s.init_param! 'servletPath', servlet_path
    s.load_on_startup 1
    s.async_supported async_supported if async_supported
  }

  w.servlet_mapping { |s|
    s.servlet_name name
    s.url_pattern url_pattern
  }
end