Sha256: 39d70745431303b5d6b09d48962951f4fd73debdb6bc3116ac9a5804c34c52f4

Contents?: true

Size: 972 Bytes

Versions: 1

Compression:

Stored size: 972 Bytes

Contents

module Feedjira
  module Parser
    class OPMLHead
      include SAXMachine
      include FeedUtilities

      element :title

      element :dateCreated, as: :date_created do |s|
        Time.parse(s)
      end

      element :dateModified, as: :date_modified do |s|
        Time.parse(s)
      end

      element :ownerName, as: :owner_name
      element :ownerEmail, as: :owner_email
      element :ownerId, as: :owner_id
      element :docs

      element :expansionState, as: :expansion_state do |s|
        s.split(',').map{ |x| x.to_f }
      end

      element :vertScrollState, as: :vert_scroll_state do |s|
        s.to_f
      end

      element :windowTop, as: :window_top do |s|
        s.to_f
      end

      element :windowLeft, as: :window_left do |s|
        s.to_f
      end

      element :windowBottom, as: :window_bottom do |s|
        s.to_f
      end

      element :windowRight, as: :window_right do |s|
        s.to_f
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
feedjira-opml-2.0.0 lib/feedjira/parser/opml_head.rb