Class: Punk::Tool::Opts
- Inherits:
-
Object
- Object
- Punk::Tool::Opts
- Defined in:
- lib/cryptopunks/tool.rb
Overview
use nested Opts class (inside Tool) - why? why not?
Instance Method Summary collapse
- #file ⇒ Object
- #file=(file) ⇒ Object
-
#file? ⇒ Boolean
note: let’s you check if file is set (or “untouched”).
- #offset ⇒ Object
- #offset=(num) ⇒ Object
- #offset? ⇒ Boolean
- #outdir ⇒ Object
- #outdir=(dir) ⇒ Object
- #outdir? ⇒ Boolean
-
#seed ⇒ Object
use a standard (default) seed - why? why not?.
- #seed=(num) ⇒ Object
- #seed? ⇒ Boolean
-
#verbose=(boolean) ⇒ Object
add: alias for debug ??.
- #verbose? ⇒ Boolean
- #zoom ⇒ Object
- #zoom=(num) ⇒ Object
- #zoom? ⇒ Boolean
Instance Method Details
#file ⇒ Object
16 |
# File 'lib/cryptopunks/tool.rb', line 16 def file() @file || './punks.png'; end |
#file=(file) ⇒ Object
18 |
# File 'lib/cryptopunks/tool.rb', line 18 def file=(file) @file = file; end |
#file? ⇒ Boolean
note: let’s you check if file is set (or “untouched”)
17 |
# File 'lib/cryptopunks/tool.rb', line 17 def file?() @file; end |
#offset ⇒ Object
24 |
# File 'lib/cryptopunks/tool.rb', line 24 def offset() @offset || 0; end |
#offset=(num) ⇒ Object
26 |
# File 'lib/cryptopunks/tool.rb', line 26 def offset=(num) @offset = num; end |
#offset? ⇒ Boolean
25 |
# File 'lib/cryptopunks/tool.rb', line 25 def offset?() @offset; end |
#outdir ⇒ Object
28 |
# File 'lib/cryptopunks/tool.rb', line 28 def outdir() @outdir || '.'; end |
#outdir=(dir) ⇒ Object
30 |
# File 'lib/cryptopunks/tool.rb', line 30 def outdir=(dir) @outdir = dir; end |
#outdir? ⇒ Boolean
29 |
# File 'lib/cryptopunks/tool.rb', line 29 def outdir?() @outdir; end |
#seed ⇒ Object
use a standard (default) seed - why? why not?
33 |
# File 'lib/cryptopunks/tool.rb', line 33 def seed() @seed || 4142; end |
#seed=(num) ⇒ Object
35 |
# File 'lib/cryptopunks/tool.rb', line 35 def seed=(num) @seed = num; end |
#seed? ⇒ Boolean
34 |
# File 'lib/cryptopunks/tool.rb', line 34 def seed?() @seed; end |
#verbose=(boolean) ⇒ Object
add: alias for debug ??
7 8 9 |
# File 'lib/cryptopunks/tool.rb', line 7 def verbose=(boolean) # add: alias for debug ?? @verbose = boolean end |
#verbose? ⇒ Boolean
11 12 13 14 |
# File 'lib/cryptopunks/tool.rb', line 11 def verbose? return false if @verbose.nil? # default verbose/debug flag is false @verbose == true end |
#zoom ⇒ Object
20 |
# File 'lib/cryptopunks/tool.rb', line 20 def zoom() @zoom || 1; end |
#zoom=(num) ⇒ Object
22 |
# File 'lib/cryptopunks/tool.rb', line 22 def zoom=(num) @zoom = num; end |
#zoom? ⇒ Boolean
21 |
# File 'lib/cryptopunks/tool.rb', line 21 def zoom?() @zoom; end |