Class: ConsolidatedScreeningList::Result
- Inherits:
-
Object
- Object
- ConsolidatedScreeningList::Result
- Defined in:
- lib/consolidated_screening_list/result.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Result
constructor
A new instance of Result.
- #inspect ⇒ Object
- #method_missing(method_name, *arguments, &block) ⇒ Object
- #respond_to_missing?(method_name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Result
Returns a new instance of Result.
5 6 7 |
# File 'lib/consolidated_screening_list/result.rb', line 5 def initialize(data) @data = data end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *arguments, &block) ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/consolidated_screening_list/result.rb', line 13 def method_missing(method_name, *arguments, &block) if data.key?(method_name.to_s) data[method_name.to_s] else super end end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/consolidated_screening_list/result.rb', line 3 def data @data end |
Instance Method Details
#inspect ⇒ Object
9 10 11 |
# File 'lib/consolidated_screening_list/result.rb', line 9 def inspect "#<ConsolidatedScreeningList::Result name=\"#{name}\">" end |
#respond_to_missing?(method_name, include_private = false) ⇒ Boolean
21 22 23 24 25 26 27 |
# File 'lib/consolidated_screening_list/result.rb', line 21 def respond_to_missing?(method_name, include_private = false) if data.key?(method_name.to_s) true else super end end |