Class: Recog::Fingerprint::Test
- Inherits:
-
Object
- Object
- Recog::Fingerprint::Test
- Defined in:
- lib/recog/fingerprint/test.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#content ⇒ Object
Returns the value of attribute content.
Instance Method Summary collapse
-
#initialize(content, attributes = []) ⇒ Test
constructor
A new instance of Test.
- #to_s ⇒ Object
Constructor Details
#initialize(content, attributes = []) ⇒ Test
Returns a new instance of Test.
6 7 8 9 10 11 12 13 14 |
# File 'lib/recog/fingerprint/test.rb', line 6 def initialize(content, attributes = []) @attributes = attributes @content = if @attributes['_encoding'] && @attributes['_encoding'] == 'base64' content.to_s.unpack1('m*') else content end end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/recog/fingerprint/test.rb', line 4 def attributes @attributes end |
#content ⇒ Object
Returns the value of attribute content.
4 5 6 |
# File 'lib/recog/fingerprint/test.rb', line 4 def content @content end |
Instance Method Details
#to_s ⇒ Object
16 17 18 |
# File 'lib/recog/fingerprint/test.rb', line 16 def to_s content end |