Module: Bookbinder::Commands::Naming

Instance Method Summary collapse

Instance Method Details

#command_for?(test_command_name) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/bookbinder/commands/naming.rb', line 6

def command_for?(test_command_name)
  command_name == test_command_name
end

#command_typeObject



14
15
16
17
18
19
20
# File 'lib/bookbinder/commands/naming.rb', line 14

def command_type
  if flag?
    'flag'
  else
    'command'
  end
end

#flag?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/bookbinder/commands/naming.rb', line 10

def flag?
  command_name.match(/^--/)
end