Class: Momocop::EnumExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/momocop/enum_extractor.rb

Instance Method Summary collapse

Instance Method Details

#extract(source) ⇒ Object



7
8
9
10
# File 'lib/momocop/enum_extractor.rb', line 7

def extract(source)
  source_string = source.is_a?(StringIO) ? source.string : source
  parse_content(source_string)
end