Class: GitCompound::Command::Arguments::Type::Type
- Inherits:
-
Object
- Object
- GitCompound::Command::Arguments::Type::Type
- Defined in:
- lib/git_compound/command/arguments/type/type.rb
Overview
Abstract argument type
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(key, args) ⇒ Type
constructor
A new instance of Type.
- #parse ⇒ Object
-
#used ⇒ Object
Returns array of arguments that has been used.
-
#valid? ⇒ Boolean
Return true if arguments array contains this parameter/argument, else - return false.
Constructor Details
#initialize(key, args) ⇒ Type
Returns a new instance of Type.
8 9 10 11 |
# File 'lib/git_compound/command/arguments/type/type.rb', line 8 def initialize(key, args) @key = key @args = args end |
Instance Method Details
#parse ⇒ Object
13 14 15 |
# File 'lib/git_compound/command/arguments/type/type.rb', line 13 def parse valid? ? { @key => value } : {} end |
#used ⇒ Object
Returns array of arguments that has been used
26 27 28 |
# File 'lib/git_compound/command/arguments/type/type.rb', line 26 def used raise NotImplementedError end |
#valid? ⇒ Boolean
Return true if arguments array contains this parameter/argument, else - return false
20 21 22 |
# File 'lib/git_compound/command/arguments/type/type.rb', line 20 def valid? raise NotImplementedError end |