Class: Fitting::Report::Actions
- Inherits:
-
Object
- Object
- Fitting::Report::Actions
- Defined in:
- lib/fitting/report/actions.rb
Defined Under Namespace
Instance Method Summary collapse
- #cover! ⇒ Object
- #find!(log) ⇒ Object
-
#initialize(actions) ⇒ Actions
constructor
A new instance of Actions.
- #push(actions) ⇒ Object
- #to_a ⇒ Object
Constructor Details
Instance Method Details
#cover! ⇒ Object
16 17 18 |
# File 'lib/fitting/report/actions.rb', line 16 def cover! end |
#find!(log) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/fitting/report/actions.rb', line 27 def find!(log) raise Empty if @actions.empty? @actions.map do |action| if log.method == action.method && action.path_match(log.path) return action end end raise NotFound.new("method: #{log.method}, host: #{log.host}, path: #{log.path}", log) end |
#push(actions) ⇒ Object
41 42 43 |
# File 'lib/fitting/report/actions.rb', line 41 def push(actions) @actions += actions.to_a end |
#to_a ⇒ Object
37 38 39 |
# File 'lib/fitting/report/actions.rb', line 37 def to_a @actions end |