Class: StreamRails::ActivityResult
- Inherits:
-
Hash
- Object
- Hash
- StreamRails::ActivityResult
- Defined in:
- lib/stream_rails/enrich.rb
Instance Attribute Summary collapse
-
#enriched ⇒ Object
Returns the value of attribute enriched.
-
#failed_to_enrich ⇒ Object
readonly
Returns the value of attribute failed_to_enrich.
Instance Method Summary collapse
- #enriched? ⇒ Boolean
- #from_activity(from) ⇒ Object
-
#initialize ⇒ ActivityResult
constructor
A new instance of ActivityResult.
- #not_enriched_fields ⇒ Object
- #track_not_enriched_field(field, value = nil) ⇒ Object
Constructor Details
#initialize ⇒ ActivityResult
Returns a new instance of ActivityResult.
8 9 10 11 |
# File 'lib/stream_rails/enrich.rb', line 8 def initialize @failed_to_enrich = {} super end |
Instance Attribute Details
#enriched ⇒ Object
Returns the value of attribute enriched.
5 6 7 |
# File 'lib/stream_rails/enrich.rb', line 5 def enriched @enriched end |
#failed_to_enrich ⇒ Object (readonly)
Returns the value of attribute failed_to_enrich.
6 7 8 |
# File 'lib/stream_rails/enrich.rb', line 6 def failed_to_enrich @failed_to_enrich end |
Instance Method Details
#enriched? ⇒ Boolean
17 18 19 |
# File 'lib/stream_rails/enrich.rb', line 17 def enriched? @failed_to_enrich.keys.length.zero? end |
#from_activity(from) ⇒ Object
13 14 15 |
# File 'lib/stream_rails/enrich.rb', line 13 def from_activity(from) merge(from) end |
#not_enriched_fields ⇒ Object
21 22 23 |
# File 'lib/stream_rails/enrich.rb', line 21 def not_enriched_fields @failed_to_enrich.keys end |
#track_not_enriched_field(field, value = nil) ⇒ Object
25 26 27 |
# File 'lib/stream_rails/enrich.rb', line 25 def track_not_enriched_field(field, value = nil) @failed_to_enrich[field] = value end |