Exception: AocCli::Errors::FlagInv

Inherits:
StandardError
  • Object
show all
Defined in:
lib/aoc_cli/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(flag) ⇒ FlagInv

Returns a new instance of FlagInv.



153
154
155
# File 'lib/aoc_cli/errors.rb', line 153

def initialize(flag)
  @flag = flag
end

Instance Attribute Details

#flagObject (readonly)

Returns the value of attribute flag.



152
153
154
# File 'lib/aoc_cli/errors.rb', line 152

def flag
  @flag
end

Instance Method Details

#messageObject



156
157
158
159
160
161
# File 'lib/aoc_cli/errors.rb', line 156

def message
  "  \#{ERROR}: Invalid flag: \#{flag.red}\n  Use the \#{\"-h\".yellow} or \#{\"--help\".yellow} flags for a list of commands\n  error\nend\n"