File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55Ruby methods may * receive* a block which is simply an anonymous function.
66
7- The following code in Ruby
7+ The following code in Ruby:
88
99``` ruby
1010some_method(1 , 2 , 3 ) { |x | puts x }
@@ -13,7 +13,7 @@ is roughly equivilent to this Javascript
1313``` JavaScript
1414some_method (1 , 2 , 3 function (x ) { console .log (x) })
1515```
16- In Ruby blocks may be specified either using ` do ... end ` or with ` { ... } `
16+ In Ruby blocks may be specified either using ` do ... end ` or with ` { ... } ` :
1717
1818``` Ruby
1919some_method { an_expression }
@@ -23,7 +23,7 @@ some_method do
2323 expressions
2424end
2525```
26- Standard style reserves the ` { ... } ` notation for single line blocks, and ` do ... end ` for multiple line blocks
26+ Standard style reserves the ` { ... } ` notation for single line blocks, and ` do ... end ` for multiple line blocks.
2727
2828### Component Instances
2929
You can’t perform that action at this time.
0 commit comments