Sha256: d907de7a7a589bd2e075aa90a110aa7970f7f5bfc9658e6f8ecca33f28d06130
Contents?: true
Size: 324 Bytes
Versions: 47
Compression:
Stored size: 324 Bytes
Contents
module ViewModel class BaseViewModel def initialize(xml_doc) @xml_doc = xml_doc end def xpath(queries, node = @xml_doc) queries.each do |query| if node node = node.at query else return nil end end node ? node.content : nil end end end
Version data entries
47 entries across 47 versions & 1 rubygems