Class: Arg
- Inherits:
-
Object
- Object
- Arg
- Defined in:
- lib/pretty_args.rb
Overview
Goal:
-
command to be executed
-
┬ ┬ ┬ ┬ ┬ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └───── day of week (0 - 7) (Sunday=0 or 7) │ │ │ └────────── month (1 - 12) │ │ └─────────────── day of month (1 - 31) │ └──────────────────── hour (0 - 23) └───────────────────────── min (0 - 59)
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#label ⇒ Object
Returns the value of attribute label.
Instance Method Summary collapse
- #hl ⇒ Object
-
#initialize(lab, des) ⇒ Arg
constructor
A new instance of Arg.
Constructor Details
#initialize(lab, des) ⇒ Arg
Returns a new instance of Arg.
17 18 19 20 |
# File 'lib/pretty_args.rb', line 17 def initialize lab, des @label = lab @description = des end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
16 17 18 |
# File 'lib/pretty_args.rb', line 16 def description @description end |
#label ⇒ Object
Returns the value of attribute label.
16 17 18 |
# File 'lib/pretty_args.rb', line 16 def label @label end |
Instance Method Details
#hl ⇒ Object
22 23 24 |
# File 'lib/pretty_args.rb', line 22 def hl (@label.length / 2.0).ceil - 1 end |