Module: RCS::CameraEvidence
- Defined in:
- lib/rcs-common/evidence/camera.rb
Instance Method Summary collapse
- #content ⇒ Object
- #decode_content(common_info, chunks) {|info| ... } ⇒ Object
- #generate_content ⇒ Object
Instance Method Details
#content ⇒ Object
7 8 9 10 |
# File 'lib/rcs-common/evidence/camera.rb', line 7 def content path = File.join(File.dirname(__FILE__), 'content', 'camera', '001.jpg') File.open(path, 'rb') {|f| f.read } end |
#decode_content(common_info, chunks) {|info| ... } ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/rcs-common/evidence/camera.rb', line 16 def decode_content(common_info, chunks) info = Hash[common_info] info[:data] = Hash.new if info[:data].nil? info[:grid_content] = chunks.first yield info if block_given? :delete_raw end |
#generate_content ⇒ Object
12 13 14 |
# File 'lib/rcs-common/evidence/camera.rb', line 12 def generate_content [ content ] end |