Method: Eapi::Methods::Types.type_question_method

Defined in:
lib/eapi/methods/types.rb

.type_question_method(method) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/eapi/methods/types.rb', line 4

def self.type_question_method(method)
  ms = method.to_s
  return false unless ms.end_with?('?')
  if ms.start_with?('is_a_')
    ms.sub('is_a_', '').sub('?', '')
  elsif ms.start_with?('is_an_')
    ms.sub('is_an_', '').sub('?', '')
  else
    nil
  end
end