class Reactor::Attributes::LinkListFromAttrValues
Attributes
attribute[RW]
obj[RW]
Public Class Methods
new(obj, attribute)
click to toggle source
# File lib/reactor/attributes/link_list_from_attr_values.rb, line 4 def initialize(obj, attribute) self.obj = obj self.attribute = attribute end
Public Instance Methods
call()
click to toggle source
# File lib/reactor/attributes/link_list_from_attr_values.rb, line 9 def call (self.obj.attr_values[self.attribute.to_s] || []).map do |link_data| RailsConnector::Link.new(link_data) end end