Sha256: 395efa04a80060cff3e6fe5fc28b6b0b13c47e2eef7022d1937b15324b9881fa

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

require 'main'

#
# ./h.rb   #=> forty-two
# ./h.rb a #=> 42 
# ./h.rb b #=> 42.0 
#

Main {
  fattr :default_for_foobar => 'forty-two' 

  option(:foobar) do
    default{ default_for_foobar }
  end

  mixin :foo do
    fattr :default_for_foobar => 42
  end

  mixin :bar do
    fattr :default_for_foobar => 42.0
  end


  run{ p params[:foobar].value }

  mode :a do
    mixin :foo
  end

  mode :b do
    mixin :bar
  end
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
main-2.8.3 samples/h.rb