Class: Bookbinder::CommandValidator::Candidate
- Inherits:
-
Struct
- Object
- Struct
- Bookbinder::CommandValidator::Candidate
- Includes:
- Bookbinder::Commands::Naming
- Defined in:
- lib/bookbinder/command_validator.rb
Instance Attribute Summary collapse
-
#command_name ⇒ Object
Returns the value of attribute command_name.
-
#commands ⇒ Object
Returns the value of attribute commands.
Instance Method Summary collapse
Methods included from Bookbinder::Commands::Naming
#command_for?, #command_type, #flag?
Instance Attribute Details
#command_name ⇒ Object
Returns the value of attribute command_name
31 32 33 |
# File 'lib/bookbinder/command_validator.rb', line 31 def command_name @command_name end |
#commands ⇒ Object
Returns the value of attribute commands
31 32 33 |
# File 'lib/bookbinder/command_validator.rb', line 31 def commands @commands end |
Instance Method Details
#deprecated_match ⇒ Object
38 39 40 41 42 43 |
# File 'lib/bookbinder/command_validator.rb', line 38 def deprecated_match @deprecated_match ||= commands.find { |command| command.respond_to?(:deprecated_command_for?) && command.deprecated_command_for?(command_name) } end |
#unrecognized? ⇒ Boolean
34 35 36 |
# File 'lib/bookbinder/command_validator.rb', line 34 def unrecognized? commands.none? { |command| command.command_for?(command_name) } end |