Module: NRB::Support::BrandNameParser

Extended by:
Concern
Defined in:
lib/nrb/support/brand_name_parser.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Methods included from Concern

append_features, class_methods, extended, included

Instance Method Details

#parse_brand_name(string, brand_class: String) ⇒ Object



26
27
28
29
30
# File 'lib/nrb/support/brand_name_parser.rb', line 26

def parse_brand_name(string, brand_class: String)
  return nil if string.nil?
  matched = match_brand_name(string)
  return brand_class.new(matched) if matched
end