Sha256: 2a7088bbc13c7ff47f4bbb8f20887634d374f9d61f43a3c96577d8fbc1884c6c

Contents?: true

Size: 503 Bytes

Versions: 24

Compression:

Stored size: 503 Bytes

Contents

rad.http

class EvaluateFormat < Rad::Conveyors::Processor
  def call    
    path = workspace.path.must_be.defined
    params = workspace.params.must_be.defined
    parts = path.split('.')        
    if parts.size > 1
      format = parts.last
      logger.warn "RAD two :format parameters!" if params.include?(:format) 
      workspace.params = params.clone
      workspace.params.format = format
    else
      params.format ||= rad.http.default_format
    end
    
    next_processor.call
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rad_core-0.2.6 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.5 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.4 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.3 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.2 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.1 lib/rad/http/processors/evaluate_format.rb
rad_core-0.2.0 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.30 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.29 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.28 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.27 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.26 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.25 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.24 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.23 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.22 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.21 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.20 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.19 lib/rad/http/processors/evaluate_format.rb
rad_core-0.0.18 lib/rad/http/processors/evaluate_format.rb