Class: PVN::FixnumOption

Inherits:
Option show all
Defined in:
lib/synoption/fixnum_option.rb

Overview

An option that has a fixnum (integer) as its value.

Direct Known Subclasses

Log::LimitOption

Constant Summary

Constants inherited from BaseOption

BaseOption::NO_CMDLINE_OPTION

Instance Attribute Summary

Attributes inherited from BaseOption

#default, #description, #name, #negate, #regexp, #tag

Instance Method Summary collapse

Methods inherited from BaseOption

#exact_match?, #initialize, #negative_match?, #next_argument, #post_process, #process, #regexp_match?, #resolve_value, #takes_value?, #to_command_line, #to_doc, #to_s, #unset, #value

Constructor Details

This class inherits a constructor from PVN::BaseOption

Instance Method Details

#set_value(val) ⇒ Object



9
10
11
# File 'lib/synoption/fixnum_option.rb', line 9

def set_value val
  super(val && val.to_i)
end