lib/wcc/blogs/post.rb in wcc-blogs-client-0.5.0 vs lib/wcc/blogs/post.rb in wcc-blogs-client-0.5.1

- old
+ new

@@ -19,13 +19,11 @@ @raw = raw @client = client end def author_full_name - return unless author - - [author.firstName, author.lastName].compact.join(' ') + author&.fullName end def html @html ||= @client.get(_links.fragment) .body @@ -67,16 +65,17 @@ 'date', 'updated_at' ) do |camelcase| value = raw[camelcase] - Time.parse(value) if value && value.length + Time.parse(value) if value&.length end define_camelcase_alias( 'author', 'hero_image', - 'thumbnail_image' + 'thumbnail_image', + 'flags' ) do |camelcase| OpenStruct.new(raw[camelcase]) if raw[camelcase] end def _links