Sha256: 4b30016741ba45c349f1243df1eedb8a36a2020bfcbc8eee0cfda6baba6d52bf

Contents?: true

Size: 572 Bytes

Versions: 27

Compression:

Stored size: 572 Bytes

Contents

# @private Inner workings of Ticket
module TicketService
# @private Inner workings of Ticket
module Rsrc
  
  # Removes static data by ID.
  def del_rsrc( rsrc_id )
    @raw_uris.delete( rsrc_id )
  end
  
  # Serves static resources. ID returned by function.
  def serve_rsrc( content, content_type )
    
    rsrc_id = @randgen.gen
    #puts "rsrc_id: #{rsrc_id.inspect}"
    
    content_size = content.bytesize.to_s
    
    @raw_uris[rsrc_id] = [content_type,content_size,content]
    
    uri = File.join(::RSence.config[:broker_urls][:d],rsrc_id)
  end
  
end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rsence-pre-3.0.0.16 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.15 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.14 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.12 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.11 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.10 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.9 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.8 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.7 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.6 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.5 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.4 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.3 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.2 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.1 plugins/ticket/lib/rsrc.rb
rsence-pre-3.0.0.0 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.26 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.25 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.24 plugins/ticket/lib/rsrc.rb
rsence-pre-2.3.0.23 plugins/ticket/lib/rsrc.rb