Class: YouTrack::Parser::CommentsParser

Inherits:
Base
  • Object
show all
Defined in:
lib/you_track/parser/comments_parser.rb

Instance Attribute Summary

Attributes inherited from Base

#raw

Instance Method Summary collapse

Methods inherited from Base

#initialize, #parse_fields

Constructor Details

This class inherits a constructor from YouTrack::Parser::Base

Instance Method Details

#parseObject



2
3
4
5
6
# File 'lib/you_track/parser/comments_parser.rb', line 2

def parse
  return [] if raw["comments"].nil?
  return [raw["comments"]["comment"]] if raw["comments"]["comment"].is_a?(Hash)
  raw["comments"]["comment"]
end