Class: CSVPlusPlus::CLIFlag
- Inherits:
-
Object
- Object
- CSVPlusPlus::CLIFlag
- Extended by:
- T::Sig
- Defined in:
- lib/csv_plus_plus/cli_flag.rb
Overview
Individual CLI flags that a user can supply
Instance Attribute Summary collapse
-
#description ⇒ String
readonly
A description of what the flag does.
-
#handler ⇒ Proc(Options, String)
readonly
A proc which is called to handle when this flag is seen.
-
#long_flag ⇒ String
readonly
A definition of the long/word-based flag.
-
#short_flag ⇒ String
readonly
A definition of the short/single-character flag.
Instance Method Summary collapse
-
#initialize(short_flag, long_flag, description) ⇒ CLIFlag
constructor
A new instance of CLIFlag.
Constructor Details
#initialize(short_flag, long_flag, description) ⇒ CLIFlag
Returns a new instance of CLIFlag.
27 28 29 30 31 |
# File 'lib/csv_plus_plus/cli_flag.rb', line 27 def initialize(short_flag, long_flag, description) @short_flag = short_flag @long_flag = long_flag @description = description end |
Instance Attribute Details
#description ⇒ String (readonly)
A description of what the flag does
11 12 13 |
# File 'lib/csv_plus_plus/cli_flag.rb', line 11 def description @description end |
#handler ⇒ Proc(Options, String) (readonly)
A proc which is called to handle when this flag is seen
11 12 13 |
# File 'lib/csv_plus_plus/cli_flag.rb', line 11 def handler @handler end |
#long_flag ⇒ String (readonly)
A definition of the long/word-based flag
11 12 13 |
# File 'lib/csv_plus_plus/cli_flag.rb', line 11 def long_flag @long_flag end |
#short_flag ⇒ String (readonly)
A definition of the short/single-character flag
11 12 13 |
# File 'lib/csv_plus_plus/cli_flag.rb', line 11 def short_flag @short_flag end |