Class: Commander::OptionMatch

Inherits:
Struct
  • Object
show all
Defined in:
lib/nub/commander.rb

Instance Method Summary collapse

Instance Method Details

#flag?Boolean

Returns:

  • (Boolean)


285
286
287
# File 'lib/nub/commander.rb', line 285

def flag?
  return opt.type == FalseClass || opt.type == TrueClass
end

#hit?Boolean

Returns:

  • (Boolean)


282
283
284
# File 'lib/nub/commander.rb', line 282

def hit?
  return !!sym
end