Class: ReliableMsg::EvaluationContext
- Inherits:
-
Object
- Object
- ReliableMsg::EvaluationContext
- Defined in:
- lib/reliable-msg/selector.rb
Overview
:nodoc:
Instance Method Summary collapse
- #[](symbol) ⇒ Object
-
#initialize(headers) ⇒ EvaluationContext
constructor
A new instance of EvaluationContext.
- #method_missing(symbol, *args, &block) ⇒ Object
- #now ⇒ Object
Constructor Details
#initialize(headers) ⇒ EvaluationContext
Returns a new instance of EvaluationContext.
77 78 79 |
# File 'lib/reliable-msg/selector.rb', line 77 def initialize headers @headers = headers end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(symbol, *args, &block) ⇒ Object
92 93 94 95 |
# File 'lib/reliable-msg/selector.rb', line 92 def method_missing symbol, *args, &block raise ArgumentError, "Wrong number of arguments (#{args.length} for 0)" unless args.empty? @headers[symbol] end |
Instance Method Details
#[](symbol) ⇒ Object
87 88 89 |
# File 'lib/reliable-msg/selector.rb', line 87 def [] symbol @headers[symbol] end |
#now ⇒ Object
82 83 84 |
# File 'lib/reliable-msg/selector.rb', line 82 def now Time.now.to_i end |