Skip to content

Commit

Permalink
[doc] book: updating the hello_recaptacha example with changes in the…
Browse files Browse the repository at this point in the history
… slicer
  • Loading branch information
Valentin Gatien-Baron committed Jun 23, 2011
1 parent f3fef85 commit 06c4314
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
13 changes: 7 additions & 6 deletions doc/book/hello_recaptcha/hello_recaptcha.adoc
Expand Up @@ -454,6 +454,8 @@ From +validate+, as well as our JavaScript implementations of +reload+ and +dest
construct our +Recaptcha.implementation+, as follows:
[source, opa]
--------------
client_reload = %%Recaptcha.reload%% /**Implementation of [reload]*/
client_destroy = %%Recaptcha.destroy%% /**Implementation of [destroy]*/
make_implementation(privkey: string): Recaptcha.implementation =
(
validate(challenge, response, callback:Recaptcha.result -> void) =
Expand Down Expand Up @@ -485,9 +487,7 @@ make_implementation(privkey: string): Recaptcha.implementation =

)
)
reload() = (%%Recaptcha.reload%%)() /**Implementation of [reload]*/
destroy()= (%%Recaptcha.destroy%%)() /**Implementation of [destroy]*/
~{validate reload destroy}
{~validate reload=client_reload destroy=client_destroy}
)
--------------
Expand Down Expand Up @@ -693,6 +693,9 @@ Recaptcha =
)
)

@private client_reload = %%Recaptcha.reload%% /**Implementation of [reload]*/
@private client_destroy = %%Recaptcha.destroy%% /**Implementation of [destroy]*/

@private make_implementation(privkey: string): Recaptcha.implementation =
(
validate(challenge, response, callback:Recaptcha.result -> void) =
Expand Down Expand Up @@ -724,9 +727,7 @@ Recaptcha =

)
)
reload() = (%%Recaptcha.reload%%)() /**Implementation of [reload]*/
destroy()= (%%Recaptcha.destroy%%)() /**Implementation of [destroy]*/
~{validate reload destroy}
{~validate reload=client_reload destroy=client_destroy}
)

@private get_token(): (string, string) =
Expand Down
7 changes: 4 additions & 3 deletions doc/book/hello_recaptcha/hello_recaptcha.opa
Expand Up @@ -183,6 +183,9 @@ Recaptcha =
)
)

@private client_reload = %%Recaptcha.reload%% /**Implementation of [reload]*/
@private client_destroy = %%Recaptcha.destroy%% /**Implementation of [destroy]*/

/**
* Construct the object representing the reCaptcha
*
Expand Down Expand Up @@ -220,9 +223,7 @@ Recaptcha =

)
)
reload() = (%%Recaptcha.reload%%)() /**Implementation of [reload]*/
destroy()= (%%Recaptcha.destroy%%)() /**Implementation of [destroy]*/
~{validate reload destroy}
{~validate reload=client_reload destroy=client_destroy}
)

/**
Expand Down

0 comments on commit 06c4314

Please sign in to comment.