Class: NDFRT::Interaction
- Inherits:
-
Object
- Object
- NDFRT::Interaction
- Defined in:
- lib/ndfrt/interaction.rb
Instance Attribute Summary collapse
-
#drugs ⇒ Object
Returns the value of attribute drugs.
-
#nui ⇒ Object
Returns the value of attribute nui.
-
#severity ⇒ Object
Returns the value of attribute severity.
Instance Method Summary collapse
-
#initialize(interaction_hash) ⇒ Interaction
constructor
A new instance of Interaction.
Constructor Details
#initialize(interaction_hash) ⇒ Interaction
Returns a new instance of Interaction.
5 6 7 8 9 10 11 |
# File 'lib/ndfrt/interaction.rb', line 5 def initialize interaction_hash concepts = interaction_hash[:group_concepts][:concept] @drugs = extract_drugs concepts @nui = extract_interaction_id concepts @severity = interaction_hash[:severity] end |
Instance Attribute Details
#drugs ⇒ Object
Returns the value of attribute drugs.
3 4 5 |
# File 'lib/ndfrt/interaction.rb', line 3 def drugs @drugs end |
#nui ⇒ Object
Returns the value of attribute nui.
3 4 5 |
# File 'lib/ndfrt/interaction.rb', line 3 def nui @nui end |
#severity ⇒ Object
Returns the value of attribute severity.
3 4 5 |
# File 'lib/ndfrt/interaction.rb', line 3 def severity @severity end |