Sha256: 3d7a701f0933fe0b33aaa53436d0e3143c496606e085f5aec749b31cd3c510f2

Contents?: true

Size: 403 Bytes

Versions: 8

Compression:

Stored size: 403 Bytes

Contents

module Reactor
  module Attributes
    class LinkListFromAttrValues
      def initialize(obj, attribute)
        self.obj       = obj
        self.attribute = attribute
      end

      def call
        (obj.attr_values[attribute.to_s] || []).map do |link_data|
          RailsConnector::Link.new(link_data)
        end
      end

      protected

      attr_accessor :obj, :attribute
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
infopark_reactor-1.29.1 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.29.0 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.28.0 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.27.0.rc10 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.27.0.rc9 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.27.0.rc8 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.27.0.rc7 lib/reactor/attributes/link_list_from_attr_values.rb
infopark_reactor-1.27.0.rc4 lib/reactor/attributes/link_list_from_attr_values.rb