Sha256: 900458c24135cc5550bbf2852e5058084b8d9e44095d440d38fd13653bd2a679
Contents?: true
Size: 943 Bytes
Versions: 6
Compression:
Stored size: 943 Bytes
Contents
require 'lib/opt_builder' # This is my hideous test script until I have a moment to grok testing # "class methods by extension" in rspec class Opts < OptBuilder single :foo, { :default => "default" } single :bar single :ninkum_poop collection :grapple_boo collection :grapple_bee, { :force_restart => true } end puts "\ndefaults create output" a = Opts.new puts a.to_s puts "\ndefaults and others can be overridden (and we dasherize opts)" a = Opts.new a.foo = "hi" a.bar = "there" a.ninkum_poop = 1 puts a.to_s puts "\ncollections work, just 1" a = Opts.new a.grapple_boo << "nana" puts a.to_s puts "\ncollections work" a = Opts.new a.grapple_boo << "nana" a.grapple_boo << "bana" a.grapple_boo << "banana" a.grapple_boo << "mascouri" puts a.to_s puts "\ncollections work with force restart" a = Opts.new a.grapple_bee << "nana" a.grapple_bee << "bana" a.grapple_bee << "banana" a.grapple_bee << "mascouri" puts a.to_s
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
flex-sdk-0.7.1 | spec/test.rb |
flex-sdk-0.7.0 | spec/test.rb |
flex-sdk-0.6.1 | spec/test.rb |
flex-sdk-0.6.0 | spec/test.rb |
flex-sdk-0.5.1 | spec/test.rb |
flex-sdk-0.5.0 | spec/test.rb |