Class: WebfingerProfile

Inherits:
Object
  • Object
show all
Defined in:
lib/webfinger_profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account, webfinger_profile) ⇒ WebfingerProfile


4
5
6
7
8
9
# File 'lib/webfinger_profile.rb', line 4

def initialize(, webfinger_profile)
  @account = 
  @webfinger_profile = webfinger_profile
  @links = {}
  set_fields
end

Instance Attribute Details

#accountObject

Returns the value of attribute account


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def 
  @account
end

#guidObject

Returns the value of attribute guid


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def guid
  @guid
end

#hcardObject

Returns the value of attribute hcard


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def hcard
  @hcard
end

Returns the value of attribute links


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def links
  @links
end

#public_keyObject

Returns the value of attribute public_key


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def public_key
  @public_key
end

#seed_locationObject

Returns the value of attribute seed_location


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def seed_location
  @seed_location
end

#webfinger_profileObject

Returns the value of attribute webfinger_profile


2
3
4
# File 'lib/webfinger_profile.rb', line 2

def webfinger_profile
  @webfinger_profile
end

Instance Method Details

#valid_diaspora_profile?Boolean


11
12
13
14
# File 'lib/webfinger_profile.rb', line 11

def valid_diaspora_profile?
  !(@webfinger_profile.nil? || @account.nil? || @links.nil? || @hcard.nil? ||
      @guid.nil? || @public_key.nil? || @seed_location.nil? )
end