Class: Federated::Relayable

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Diaspora::Federated::Base, Diaspora::Guid, Diaspora::Relayable
Defined in:
lib/federated/relayable.rb

Direct Known Subclasses

Like, Participation

Instance Method Summary collapse

Methods included from Diaspora::Relayable

#after_receive, #author_is_not_ignored, included, #initialize_signatures, #parent_guid, #parent_guid=, #receive, #relayable?, #signature_valid?, #subscribers, #verify_parent_author_signature

Methods included from Diaspora::Encryptable

#sign_with_key, #signable_accessors, #signable_string, #verify_signature

Methods included from Diaspora::Guid

included, #set_guid

Methods included from Diaspora::Federated::Base

included

Instance Method Details

#diaspora_handleObject


22
23
24
# File 'lib/federated/relayable.rb', line 22

def diaspora_handle
  self.author.diaspora_handle
end

#diaspora_handle=(nh) ⇒ Object


26
27
28
# File 'lib/federated/relayable.rb', line 26

def diaspora_handle=(nh)
  self.author = Webfinger.new(nh).fetch
end

#parentObject


34
35
36
# File 'lib/federated/relayable.rb', line 34

def parent
  self.target
end

#parent=(parent) ⇒ Object


38
39
40
# File 'lib/federated/relayable.rb', line 38

def parent= parent
  self.target = parent
end

#parent_classObject


30
31
32
# File 'lib/federated/relayable.rb', line 30

def parent_class
  self.target_type.constantize
end