Skip to content

Conversation

@lambdalisue
Copy link
Contributor

To solve #26. I create a 'global' helper which can register events globally like:

let s:events = {}

function! s:events.initialize() abort
  call themis#log('Initialize')
endfunction

function! s:events.before() abort
  call themis#log('Before')
endfunction

function! s:events.before_each() abort
  call themis#log('Before each')
endfunction

function! s:events.after_each() abort
  call themis#log('After each')
endfunction

function! s:events.after() abort
  call themis#log('After')
endfunction

function! s:events.finalize() abort
  call themis#log('Finalize')
endfunction

" Register global event
call themis#helper('global').with(s:events)

@thinca
Copy link
Owner

thinca commented Aug 25, 2016

すいませんがちょっと保留させてください。インターフェースがちょっとしっくり来ない…(主に with)。

@lambdalisue
Copy link
Contributor Author

Oh. 了解しました。

@lambdalisue
Copy link
Contributor Author

ping

@lambdalisue
Copy link
Contributor Author

これ

call themis#helper('global').use(s:events)

とかだとシックリきたりします?w

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants