Sha256: be6b9e021b66de66bd3cb7f1f060cedad59fb09f829b6ed4c7235ac36ca22496

Contents?: true

Size: 1005 Bytes

Versions: 1

Compression:

Stored size: 1005 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 do |s|
        URI(s)
      end

      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.1 lib/feedjira/parser/opml_head.rb