Class: Openname::User
- Inherits:
-
Object
- Object
- Openname::User
- Defined in:
- lib/openname.rb
Instance Attribute Summary collapse
-
#avatar_url ⇒ Object
readonly
Returns the value of attribute avatar_url.
-
#bio ⇒ Object
readonly
Returns the value of attribute bio.
-
#bitcoin_address ⇒ Object
readonly
Returns the value of attribute bitcoin_address.
-
#bitcoinotc_username ⇒ Object
readonly
Returns the value of attribute bitcoinotc_username.
-
#bitmessage_address ⇒ Object
readonly
Returns the value of attribute bitmessage_address.
-
#cover_url ⇒ Object
readonly
Returns the value of attribute cover_url.
-
#facebook_username ⇒ Object
readonly
Returns the value of attribute facebook_username.
-
#github_username ⇒ Object
readonly
Returns the value of attribute github_username.
-
#linkedin_username ⇒ Object
readonly
Returns the value of attribute linkedin_username.
-
#location_formatted ⇒ Object
readonly
Returns the value of attribute location_formatted.
-
#name_formatted ⇒ Object
readonly
Returns the value of attribute name_formatted.
-
#openname ⇒ Object
readonly
Returns the value of attribute openname.
-
#orgs ⇒ Object
readonly
Returns the value of attribute orgs.
-
#pgp_fingerprint ⇒ Object
readonly
Returns the value of attribute pgp_fingerprint.
-
#pgp_url ⇒ Object
readonly
Returns the value of attribute pgp_url.
-
#schema_version ⇒ Object
readonly
Returns the value of attribute schema_version.
-
#twitter_username ⇒ Object
readonly
Returns the value of attribute twitter_username.
-
#website ⇒ Object
readonly
Returns the value of attribute website.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(json, openname) ⇒ User
constructor
A new instance of User.
Constructor Details
#initialize(json, openname) ⇒ User
Returns a new instance of User.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/openname.rb', line 104 def initialize(json,openname) @openname = openname @name_formatted = json["name"]["formatted"] if json["name"] @avatar_url = json["avatar"]["url"] if json["avatar"] @cover_url = json["cover"]["url"] if json["cover"] @location_formatted = json["location"]["formatted"] if json["location"] @website = json["website"] @bio = json["bio"] @github_username = json["github"]["username"] if json["github"] @facebook_username = json["facebook"]["username"] if json["facebook"] @twitter_username = json["twitter"]["username"] if json["twitter"] @linkedin_username = json["linkedin"]["username"] if json["linkedin"] @bitcoin_address = json["bitcoin"]["address"] if json["bitcoin"] @bitmessage_address = json["bitmessage"]["username"] if json["bitmessage"] @bitcoinotc_username = json["bitcoinotc"]["username"] if json["bitcoinotc"] @pgp_fingerprint = json["pgp"]["fingerprint"] if json["pgp"] @pgp_url = json["pgp"]["url"] if json["url"] @schema_version = json["v"] @orgs = parse_orgs(json["orgs"]) end |
Instance Attribute Details
#avatar_url ⇒ Object (readonly)
Returns the value of attribute avatar_url.
86 87 88 |
# File 'lib/openname.rb', line 86 def avatar_url @avatar_url end |
#bio ⇒ Object (readonly)
Returns the value of attribute bio.
90 91 92 |
# File 'lib/openname.rb', line 90 def bio @bio end |
#bitcoin_address ⇒ Object (readonly)
Returns the value of attribute bitcoin_address.
95 96 97 |
# File 'lib/openname.rb', line 95 def bitcoin_address @bitcoin_address end |
#bitcoinotc_username ⇒ Object (readonly)
Returns the value of attribute bitcoinotc_username.
97 98 99 |
# File 'lib/openname.rb', line 97 def bitcoinotc_username @bitcoinotc_username end |
#bitmessage_address ⇒ Object (readonly)
Returns the value of attribute bitmessage_address.
96 97 98 |
# File 'lib/openname.rb', line 96 def @bitmessage_address end |
#cover_url ⇒ Object (readonly)
Returns the value of attribute cover_url.
87 88 89 |
# File 'lib/openname.rb', line 87 def cover_url @cover_url end |
#facebook_username ⇒ Object (readonly)
Returns the value of attribute facebook_username.
92 93 94 |
# File 'lib/openname.rb', line 92 def facebook_username @facebook_username end |
#github_username ⇒ Object (readonly)
Returns the value of attribute github_username.
91 92 93 |
# File 'lib/openname.rb', line 91 def github_username @github_username end |
#linkedin_username ⇒ Object (readonly)
Returns the value of attribute linkedin_username.
94 95 96 |
# File 'lib/openname.rb', line 94 def linkedin_username @linkedin_username end |
#location_formatted ⇒ Object (readonly)
Returns the value of attribute location_formatted.
88 89 90 |
# File 'lib/openname.rb', line 88 def location_formatted @location_formatted end |
#name_formatted ⇒ Object (readonly)
Returns the value of attribute name_formatted.
85 86 87 |
# File 'lib/openname.rb', line 85 def name_formatted @name_formatted end |
#openname ⇒ Object (readonly)
Returns the value of attribute openname.
84 85 86 |
# File 'lib/openname.rb', line 84 def openname @openname end |
#orgs ⇒ Object (readonly)
Returns the value of attribute orgs.
100 101 102 |
# File 'lib/openname.rb', line 100 def orgs @orgs end |
#pgp_fingerprint ⇒ Object (readonly)
Returns the value of attribute pgp_fingerprint.
98 99 100 |
# File 'lib/openname.rb', line 98 def pgp_fingerprint @pgp_fingerprint end |
#pgp_url ⇒ Object (readonly)
Returns the value of attribute pgp_url.
99 100 101 |
# File 'lib/openname.rb', line 99 def pgp_url @pgp_url end |
#schema_version ⇒ Object (readonly)
Returns the value of attribute schema_version.
101 102 103 |
# File 'lib/openname.rb', line 101 def schema_version @schema_version end |
#twitter_username ⇒ Object (readonly)
Returns the value of attribute twitter_username.
93 94 95 |
# File 'lib/openname.rb', line 93 def twitter_username @twitter_username end |
#website ⇒ Object (readonly)
Returns the value of attribute website.
89 90 91 |
# File 'lib/openname.rb', line 89 def website @website end |