lib/gaps/db/group.rb
# Parse the description into freeform-text and a config hash
Parse the description into freeform-text and a config hash
Parse the description into freeform - text and a config hash
def parse_description
      desc = self.description
      text, tag = split_last_line(desc)
      begin
        config = JSON.parse(tag)
        unless config.kind_of?(Hash)
          log.error("Ignoring non-hash JSON tag", text: text, tag: tag, group_email: group_email)
          text = desc
          config = {}
        end
      rescue JSON::ParserError
        text = desc
        config = {}
      end
      [text, config]
    end
def parse_description desc = self . description text , tag = split_last_line ( desc ) begin config = JSON . parse ( tag ) unless config . kind_of? ( Hash ) log . error ( "Ignoring non-hash JSON tag" , text : text , tag : tag , group_email : group_email ) text = desc config = { } end rescue JSON :: ParserError text = desc config = { } end [ text , config ] end
Parse the description into freeform-text and a config hash
Parse the description into freeform - text and a config hash