class GitCompound::Command::Arguments::Type::Type
Abstract argument type
Public Class Methods
new(key, args)
click to toggle source
# File lib/git_compound/command/arguments/type/type.rb, line 8 def initialize(key, args) @key = key @args = args end
Public Instance Methods
parse()
click to toggle source
# File lib/git_compound/command/arguments/type/type.rb, line 13 def parse valid? ? { @key => value } : {} end
used()
click to toggle source
Returns array of arguments that has been used
# File lib/git_compound/command/arguments/type/type.rb, line 26 def used raise NotImplementedError end
valid?()
click to toggle source
Return true if arguments array contains this parameter/argument, else - return false
# File lib/git_compound/command/arguments/type/type.rb, line 20 def valid? raise NotImplementedError end
Private Instance Methods
value()
click to toggle source
Return value converted to valid type
# File lib/git_compound/command/arguments/type/type.rb, line 41 def value raise NotImplementedError end
value!()
click to toggle source
Returns bare value extracted from args or nil if bare arguments is irrelevant
# File lib/git_compound/command/arguments/type/type.rb, line 35 def value! raise NotImplementedError end