Module: Safrano::Transitions::GetNextTrans::BySimpleDetect

Instance Method Summary collapse

Instance Method Details

#get_next_transresult(path_remain) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/odata/transition.rb', line 10

def get_next_transresult(path_remain)
  # current url-parsing context
  # has no ambiguous next match and we dont need to find longest match
  # but it's sufficient to find the one matching (or nil)
  tres_next = nil
  @allowed_transitions.detect { |t| tres_next = t.result(path_remain) }
  tres_next
end