module Vue

See below… require_relative 'helpers/methods' require_relative 'helpers/server'

This file contains the bulk of vue-helpers functions. They constructed here as a module of refinements, and used in the main 'controller'. However, being refinements, they are invisible and inaccessible in user-space.

The funky self-referencing refinement code on this page is necessary for these refinement methods to see each other. Remember… lexical scope: a refined method call must have 'using…' somewhere on the same page (or sometimes in the same module). So these refinements must refine themselves.

This actually works, even with the self-refiment at the bottom of the module.

See Ruby 2.4 release notes & changelog for more info on the refinement features used here: github.com/ruby/ruby/blob/v2_4_0/NEWS