Sha256: abccdfaaf82d57e0f3005ff19d4747e596502a1d5555e8080ac2a1ecf38d7d15

Contents?: true

Size: 460 Bytes

Versions: 4

Compression:

Stored size: 460 Bytes

Contents

module Nokogiri::Decorators::XBEL
  module Alias
    extend Forwardable
    def_delegators :entry,
        :description, :title, :to_s, :id, :added, :bookmark?, :folder?

    def ref
      attribute('ref').content
    end
    def ref=(value)
      set_attribute 'ref', value.to_s
    end
    alias_method :reference, :ref
    alias_method :reference=, :ref=

    def entry
      at %Q'//*[@id="#{ ref }"]'
    end

    def alias?
      true
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
xbel-0.2.1 lib/nokogiri/decorators/xbel/alias.rb
xbel-0.2.0 lib/nokogiri/decorators/xbel/alias.rb
xbel-0.1.2 lib/nokogiri/decorators/xbel/alias.rb
xbel-0.1.1 lib/nokogiri/decorators/xbel/alias.rb