Class: Pingback::Receiver
- Inherits:
-
Object
- Object
- Pingback::Receiver
- Defined in:
- lib/webby-pingback.rb
Overview
/ Sender
Instance Attribute Summary collapse
-
#response_message ⇒ Object
readonly
Returns the value of attribute response_message.
Instance Method Summary collapse
-
#initialize(source, target) ⇒ Receiver
constructor
A new instance of Receiver.
Constructor Details
#initialize(source, target) ⇒ Receiver
Returns a new instance of Receiver.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/webby-pingback.rb', line 104 def initialize(source, target) @@db = Amalgalite::Database.new(Pingback::Conf[:db]) @@forum_api_key = Pingback::Conf[:forum_api_key] @source = source @target = target @response_message = '' db_schema if pingback_exists? @response_message = 'The pingback has already been registered' return true end trackback_url = fetch_trackback_url() if trackback_url.nil? @response_message = 'The specified target URI cannot be used as a target.' return false end trackback_data = fetch_source_data() if trackback_data[:excerpt].empty? @response_message = 'No link to target page!' return false end send_trackback(trackback_url, trackback_data) end |
Instance Attribute Details
#response_message ⇒ Object (readonly)
Returns the value of attribute response_message.
131 132 133 |
# File 'lib/webby-pingback.rb', line 131 def @response_message end |