Sha256: 691ff10543bfe90cc49d7308b720528d2f28e5fcc40cd7c50764be749765b022

Contents?: true

Size: 459 Bytes

Versions: 7

Compression:

Stored size: 459 Bytes

Contents

result: try
  nonexistent * missing
catch error
  true

result2: try nonexistent * missing catch error then true

ok result is true and result2 is true, 'can assign the result of a try/catch block'


get_x: -> 10

if x: get_x() then 100

ok x is 10, 'can assign a conditional statement'

x: if get_x() then 100

ok x is 100, 'can assign a conditional statement'


tester: ->
  @example: -> puts 'example function'
  this

ok tester().example.name is 'example'

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
haml-more-0.5.1 vendor/coffee-script/test/test_assignment.coffee
haml-more-0.5.0 vendor/coffee-script/test/test_assignment.coffee
haml-more-0.4.0 vendor/coffee-script/test/test_assignment.coffee
haml-more-0.4.0.d vendor/coffee-script/test/test_assignment.coffee
haml-more-0.4.0.c vendor/coffee-script/test/test_assignment.coffee
haml-more-0.4.0.b vendor/coffee-script/test/test_assignment.coffee
haml-more-0.4.0.a vendor/coffee-script/test/test_assignment.coffee