From f282d947933b81a4c93f2cccf0313c3431458b51 Mon Sep 17 00:00:00 2001 From: Ralph Desir Date: Fri, 17 Jul 2015 14:25:15 -0400 Subject: Update hash.h.md --- doc/api/mruby/hash.h.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'doc/api') diff --git a/doc/api/mruby/hash.h.md b/doc/api/mruby/hash.h.md index bdc2a7f2b..b7962696c 100644 --- a/doc/api/mruby/hash.h.md +++ b/doc/api/mruby/hash.h.md @@ -55,8 +55,11 @@ Sets a keys and values to hashes. #### Example In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument -and what class the passed in value is. This example sets a key and value pair to a hash. In pure Ruby doing this is equivalent to a = {:da_key => 80}. +and what class the passed in value is. This example sets a key and value pair to a hash. In pure Ruby doing this is equivalent to: +```Ruby +a = {:da_key => 80} +``` ```C #include @@ -114,8 +117,12 @@ Gets a value from a key. #### Example In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument -and what class the passed in value is. This example gets a value from a key. In pure Ruby doing this is equivalent to a = {:da_key => 80} -a[:da_key]. +and what class the passed in value is. This example gets a value from a key. In pure Ruby doing this is equivalent to: + +```Ruby +a = {:da_key => 80} +a[:da_key] +``` ```C #include @@ -177,9 +184,12 @@ Deletes hash key and value pair. #### Example In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument -and what class the passed in value is. This example deletes hash key and value pair. In pure Ruby doing this is equivalent to a = {:da_key1 => 80,:da_key2 => 90} -a.delete(:da_key2) +and what class the passed in value is. This example deletes hash key and value pair. In pure Ruby doing this is equivalent to: +```Ruby +a = {:da_key1 => 80,:da_key2 => 90} +a.delete(:da_key2) +``` ```C #include @@ -308,9 +318,12 @@ Clears the hash. #### Example In this example we read from a Ruby file inside C. The Ruby code will print what you pass as an argument -and what class the passed in value is. This example clears the hash. In pure Ruby doing this is equivalent to +and what class the passed in value is. This example clears the hash. In pure Ruby doing this is equivalent to: + +```Ruby a = {:da_key1 => 80,:da_key2 => 90} a.clear +``` ```C #include -- cgit v1.2.3