summaryrefslogtreecommitdiff
path: root/lib/slop/option.rb
diff options
context:
space:
mode:
authorLee Jarvis <ljjarvis@gmail.com>2014-12-17 15:12:19 +0000
committerLee Jarvis <ljjarvis@gmail.com>2014-12-17 15:12:19 +0000
commitcacbe70cd07487716de8401cc4e2ac399f19d537 (patch)
treee0d3328ae8519fc938a193501098961b3b62c906 /lib/slop/option.rb
parenta13b9578359f21e14f5a2fa5274a6edd59cd64a1 (diff)
downloadslop-cacbe70cd07487716de8401cc4e2ac399f19d537.tar.gz
Comments and clean up
Diffstat (limited to 'lib/slop/option.rb')
-rw-r--r--lib/slop/option.rb20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/slop/option.rb b/lib/slop/option.rb
index 870c518..5dc8156 100644
--- a/lib/slop/option.rb
+++ b/lib/slop/option.rb
@@ -4,7 +4,24 @@ module Slop
help: true
}
- attr_reader :flags, :desc, :config, :count, :block
+ # An Array of flags this option matches.
+ attr_reader :flags
+
+ # A custom description used for the help text.
+ attr_reader :desc
+
+ # A Hash of configuration options.
+ attr_reader :config
+
+ # An Integer count for the total times this option
+ # has been executed.
+ attr_reader :count
+
+ # A custom proc that yields the option value when
+ # it's executed.
+ attr_reader :block
+
+ # The end value for this option.
attr_writer :value
def initialize(flags, desc, **config, &block)
@@ -12,7 +29,6 @@ module Slop
@desc = desc
@config = DEFAULT_CONFIG.merge(config)
@block = block
-
reset
end