Class: Punk::Opts
- Inherits:
-
Object
- Object
- Punk::Opts
- Defined in:
- lib/cryptopunks/tool.rb
Instance Method Summary collapse
- #file ⇒ Object
-
#file? ⇒ Boolean
note: let’s you check if file is set (or “untouched”).
- #merge_gli_options!(options = {}) ⇒ Object
- #offset ⇒ Object
- #offset? ⇒ Boolean
- #outdir ⇒ Object
- #outdir? ⇒ Boolean
-
#seed ⇒ Object
use a standard (default) seed - why? why not?.
- #seed? ⇒ Boolean
-
#verbose=(boolean) ⇒ Object
add: alias for debug ??.
- #verbose? ⇒ Boolean
- #zoom ⇒ Object
- #zoom? ⇒ Boolean
Instance Method Details
#file ⇒ Object
39 |
# File 'lib/cryptopunks/tool.rb', line 39 def file() @file || './punks.png'; end |
#file? ⇒ Boolean
note: let’s you check if file is set (or “untouched”)
40 |
# File 'lib/cryptopunks/tool.rb', line 40 def file?() @file; end |
#merge_gli_options!(options = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/cryptopunks/tool.rb', line 14 def ( = {} ) # puts " update options:" # puts options.inspect @file = [:file] if [:file] @outdir = [:dir] if [:dir] @zoom = [:zoom] if [:zoom] @offset = [:offset] if [:offset] @seed = [:seed] if [:seed] @verbose = true if [:verbose] == true end |
#offset ⇒ Object
45 |
# File 'lib/cryptopunks/tool.rb', line 45 def offset() @offset || 0; end |
#offset? ⇒ Boolean
46 |
# File 'lib/cryptopunks/tool.rb', line 46 def offset?() @offset; end |
#outdir ⇒ Object
48 |
# File 'lib/cryptopunks/tool.rb', line 48 def outdir() @outdir || '.'; end |
#outdir? ⇒ Boolean
49 |
# File 'lib/cryptopunks/tool.rb', line 49 def outdir?() @outdir; end |
#seed ⇒ Object
use a standard (default) seed - why? why not?
52 |
# File 'lib/cryptopunks/tool.rb', line 52 def seed() @seed || 4142; end |
#seed? ⇒ Boolean
53 |
# File 'lib/cryptopunks/tool.rb', line 53 def seed?() @seed; end |
#verbose=(boolean) ⇒ Object
add: alias for debug ??
30 31 32 |
# File 'lib/cryptopunks/tool.rb', line 30 def verbose=(boolean) # add: alias for debug ?? @verbose = boolean end |
#verbose? ⇒ Boolean
34 35 36 37 |
# File 'lib/cryptopunks/tool.rb', line 34 def verbose? return false if @verbose.nil? # default verbose/debug flag is false @verbose == true end |
#zoom ⇒ Object
42 |
# File 'lib/cryptopunks/tool.rb', line 42 def zoom() @zoom || 1; end |
#zoom? ⇒ Boolean
43 |
# File 'lib/cryptopunks/tool.rb', line 43 def zoom?() @zoom; end |