Sha256: fe99dc787c0fa9c2f7f42ddeeaa12cde27f0796a95a553a76df68ca233d67451

Contents?: true

Size: 417 Bytes

Versions: 24

Compression:

Stored size: 417 Bytes

Contents

module RailsConnector::LiquidSupport

  # Dieser Drop kapselt einen Link.
  class LinkDrop < Liquid::Drop
    def initialize(link)
      @link = link
    end

    def __drop_content
      @link
    end

    [:url, :external?, :internal?, :title, :display_title].each do |m|
      define_method(m) { @link.__send__(m).to_liquid }
    end

    def destination
      @link.destination_object.to_liquid
    end
  end

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
infopark_rails_connector-6.8.0.356.19698103 lib/rails_connector/liquid_support/link_drop.rb
infopark_rails_connector-6.8.0.348.160665197 lib/rails_connector/liquid_support/link_drop.rb
infopark_rails_connector-6.8.0.328.4a753fc lib/rails_connector/liquid_support/link_drop.rb
infopark_rails_connector-6.8.0.322.c003f11 lib/rails_connector/liquid_support/link_drop.rb