Module: VkMusic::Utility::NodeTextChildrenReader

Defined in:
lib/vk_music/utility/node_text_children_reader.rb

Overview

Read inner of text-childrens of Nokogiri::XML::Node node

Class Method Summary collapse

Class Method Details

.call(node) ⇒ String

Parameters:

  • node (Nokogiri::XML::Node)

Returns:

  • (String)


9
10
11
# File 'lib/vk_music/utility/node_text_children_reader.rb', line 9

def self.call(node)
  node.children.select(&:text?).map(&:text).join.strip
end