Module: Neon::ArgumentHelpers
- Included in:
- Node
- Defined in:
- lib/helpers/argument_helpers.rb
Overview
Helpers for processing method arguments.
Instance Method Summary collapse
-
#extract_session(args) ⇒ Session
Extracts a session from the array of arguments if one exists at the end.
Instance Method Details
#extract_session(args) ⇒ Session
Extracts a session from the array of arguments if one exists at the end.
11 12 13 14 15 16 17 |
# File 'lib/helpers/argument_helpers.rb', line 11 def extract_session(args) if args.last.is_a?(Session::Rest) || args.last.is_a?(Session::Embedded) args.pop else Session.current end end |