Class Facebooker::Feed::ActionBase
In: lib/facebooker/feed.rb
Parent: Object

Methods

Public Instance methods

[Source]

# File lib/facebooker/feed.rb, line 12
      def add_image(image,link=nil)
        1.upto(4) do |num|
          if send("image_#{num}").blank?
            send("image_#{num}=",image)
            send("image_#{num}_link=",link) unless link.nil?
            return num
          end
        end        
      end

Protected Instance methods

[Source]

# File lib/facebooker/feed.rb, line 24
      def image_params
        image_hash = {}
        1.upto(4) do |num|
          image_attribute = "image_#{num}"
          image_link_attribute = image_attribute + "_link"
          self.__send__(image_attribute) ? image_hash[image_attribute] = self.__send__(image_attribute) : nil
          self.__send__(image_link_attribute) ? image_hash[image_link_attribute] = self.__send__(image_link_attribute) : nil    
        end
        image_hash
      end

[Validate]