Class: ThinktankExpert
- Defined in:
- lib/models/thinktank_expert.rb
Instance Attribute Summary collapse
-
#area_of_expertise ⇒ Object
Returns the value of attribute area_of_expertise.
-
#associated_program ⇒ Object
Returns the value of attribute associated_program.
-
#audios ⇒ Object
Returns the value of attribute audios.
-
#content ⇒ Object
Returns the value of attribute content.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#domain ⇒ Object
Returns the value of attribute domain.
-
#education ⇒ Object
Returns the value of attribute education.
-
#email ⇒ Object
Returns the value of attribute email.
-
#facebook ⇒ Object
Returns the value of attribute facebook.
-
#files ⇒ Object
Returns the value of attribute files.
-
#id ⇒ Object
Returns the value of attribute id.
-
#instagram ⇒ Object
Returns the value of attribute instagram.
-
#lang ⇒ Object
Returns the value of attribute lang.
-
#link ⇒ Object
Returns the value of attribute link.
-
#linkedin ⇒ Object
Returns the value of attribute linkedin.
-
#location ⇒ Object
Returns the value of attribute location.
-
#name ⇒ Object
Returns the value of attribute name.
-
#nationalities ⇒ Object
Returns the value of attribute nationalities.
-
#oss_files ⇒ Object
Returns the value of attribute oss_files.
-
#oss_profile_images ⇒ Object
Returns the value of attribute oss_profile_images.
-
#person_type ⇒ Object
Returns the value of attribute person_type.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#profile_images ⇒ Object
Returns the value of attribute profile_images.
-
#related_topics ⇒ Object
Returns the value of attribute related_topics.
-
#site_name ⇒ Object
Returns the value of attribute site_name.
-
#site_name_cn ⇒ Object
Returns the value of attribute site_name_cn.
-
#source ⇒ Object
Returns the value of attribute source.
-
#title ⇒ Object
Returns the value of attribute title.
-
#twitter ⇒ Object
Returns the value of attribute twitter.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#videos ⇒ Object
Returns the value of attribute videos.
-
#website ⇒ Object
Returns the value of attribute website.
-
#wikidata ⇒ Object
Returns the value of attribute wikidata.
Class Method Summary collapse
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(options = {}) ⇒ ThinktankExpert
constructor
A new instance of ThinktankExpert.
- #to_json ⇒ Object
Methods inherited from BaseModel
fields, register, #verify, #verify_empty, #verify_fields, #verify_int, #verify_json, #verify_length, #verify_regex, #verify_string
Constructor Details
#initialize(options = {}) ⇒ ThinktankExpert
Returns a new instance of ThinktankExpert.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/models/thinktank_expert.rb', line 43 def initialize(={}) = JSON.parse(.to_json) @id = ["id"] @name = ["name"] @title = ["title"] @content = ["content"] @location = ["location"] @area_of_expertise = ["area_of_expertise"] @profile_images = ["profile_images"] @phone = ["phone"] @email = ["email"] @link = ["link"] @audios = ["audios"] @videos = ["videos"] @education = ["education"] @related_topics = ["related_topics"] @site_name = ["site_name"] @site_name_cn = ["site_name_cn"] @domain = ["domain"] @created_at = ["created_at"] @updated_at = ["updated_at"] @source = ["source"] @oss_profile_images = ["oss_profile_images"] @facebook = ["facebook"] @twitter = ["twitter"] @linkedin = ["linkedin"] @instagram = ["instagram"] @wikidata = ["wikidata"] @person_type = ["person_type"] @files = ["files"] @oss_files = ["oss_files"] @associated_program = ["associated_program"] @lang = ["lang"] @website = ["website"] @nationalities = ["nationalities"] end |
Instance Attribute Details
#area_of_expertise ⇒ Object
Returns the value of attribute area_of_expertise.
7 8 9 |
# File 'lib/models/thinktank_expert.rb', line 7 def area_of_expertise @area_of_expertise end |
#associated_program ⇒ Object
Returns the value of attribute associated_program.
31 32 33 |
# File 'lib/models/thinktank_expert.rb', line 31 def associated_program @associated_program end |
#audios ⇒ Object
Returns the value of attribute audios.
12 13 14 |
# File 'lib/models/thinktank_expert.rb', line 12 def audios @audios end |
#content ⇒ Object
Returns the value of attribute content.
5 6 7 |
# File 'lib/models/thinktank_expert.rb', line 5 def content @content end |
#created_at ⇒ Object
Returns the value of attribute created_at.
19 20 21 |
# File 'lib/models/thinktank_expert.rb', line 19 def created_at @created_at end |
#domain ⇒ Object
Returns the value of attribute domain.
18 19 20 |
# File 'lib/models/thinktank_expert.rb', line 18 def domain @domain end |
#education ⇒ Object
Returns the value of attribute education.
14 15 16 |
# File 'lib/models/thinktank_expert.rb', line 14 def education @education end |
#email ⇒ Object
Returns the value of attribute email.
10 11 12 |
# File 'lib/models/thinktank_expert.rb', line 10 def email @email end |
#facebook ⇒ Object
Returns the value of attribute facebook.
23 24 25 |
# File 'lib/models/thinktank_expert.rb', line 23 def facebook @facebook end |
#files ⇒ Object
Returns the value of attribute files.
29 30 31 |
# File 'lib/models/thinktank_expert.rb', line 29 def files @files end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/models/thinktank_expert.rb', line 2 def id @id end |
#instagram ⇒ Object
Returns the value of attribute instagram.
26 27 28 |
# File 'lib/models/thinktank_expert.rb', line 26 def instagram @instagram end |
#lang ⇒ Object
Returns the value of attribute lang.
32 33 34 |
# File 'lib/models/thinktank_expert.rb', line 32 def lang @lang end |
#link ⇒ Object
Returns the value of attribute link.
11 12 13 |
# File 'lib/models/thinktank_expert.rb', line 11 def link @link end |
#linkedin ⇒ Object
Returns the value of attribute linkedin.
25 26 27 |
# File 'lib/models/thinktank_expert.rb', line 25 def linkedin @linkedin end |
#location ⇒ Object
Returns the value of attribute location.
6 7 8 |
# File 'lib/models/thinktank_expert.rb', line 6 def location @location end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/models/thinktank_expert.rb', line 3 def name @name end |
#nationalities ⇒ Object
Returns the value of attribute nationalities.
34 35 36 |
# File 'lib/models/thinktank_expert.rb', line 34 def nationalities @nationalities end |
#oss_files ⇒ Object
Returns the value of attribute oss_files.
30 31 32 |
# File 'lib/models/thinktank_expert.rb', line 30 def oss_files @oss_files end |
#oss_profile_images ⇒ Object
Returns the value of attribute oss_profile_images.
22 23 24 |
# File 'lib/models/thinktank_expert.rb', line 22 def oss_profile_images @oss_profile_images end |
#person_type ⇒ Object
Returns the value of attribute person_type.
28 29 30 |
# File 'lib/models/thinktank_expert.rb', line 28 def person_type @person_type end |
#phone ⇒ Object
Returns the value of attribute phone.
9 10 11 |
# File 'lib/models/thinktank_expert.rb', line 9 def phone @phone end |
#profile_images ⇒ Object
Returns the value of attribute profile_images.
8 9 10 |
# File 'lib/models/thinktank_expert.rb', line 8 def profile_images @profile_images end |
#related_topics ⇒ Object
Returns the value of attribute related_topics.
15 16 17 |
# File 'lib/models/thinktank_expert.rb', line 15 def @related_topics end |
#site_name ⇒ Object
Returns the value of attribute site_name.
16 17 18 |
# File 'lib/models/thinktank_expert.rb', line 16 def site_name @site_name end |
#site_name_cn ⇒ Object
Returns the value of attribute site_name_cn.
17 18 19 |
# File 'lib/models/thinktank_expert.rb', line 17 def site_name_cn @site_name_cn end |
#source ⇒ Object
Returns the value of attribute source.
21 22 23 |
# File 'lib/models/thinktank_expert.rb', line 21 def source @source end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/models/thinktank_expert.rb', line 4 def title @title end |
#twitter ⇒ Object
Returns the value of attribute twitter.
24 25 26 |
# File 'lib/models/thinktank_expert.rb', line 24 def twitter @twitter end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
20 21 22 |
# File 'lib/models/thinktank_expert.rb', line 20 def updated_at @updated_at end |
#videos ⇒ Object
Returns the value of attribute videos.
13 14 15 |
# File 'lib/models/thinktank_expert.rb', line 13 def videos @videos end |
#website ⇒ Object
Returns the value of attribute website.
33 34 35 |
# File 'lib/models/thinktank_expert.rb', line 33 def website @website end |
#wikidata ⇒ Object
Returns the value of attribute wikidata.
27 28 29 |
# File 'lib/models/thinktank_expert.rb', line 27 def wikidata @wikidata end |
Class Method Details
.table_name ⇒ Object
37 38 39 |
# File 'lib/models/thinktank_expert.rb', line 37 def self.table_name return "thinktank_experts" end |
.verify_keys ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/models/thinktank_expert.rb', line 122 def self.verify_keys return { "id"=> ["empty", "string"], "title"=> ["json", "string"], "name"=> ["empty", "string"], "site_name_cn"=>["empty", "string"], "site_name"=> ["empty", "string"], "source"=> ["empty", "string"], "audios"=> ["json", "string"], "videos"=> ["json", "string"], "related_topics"=>["json", "string"], "files"=> ["json", "string"], "oss_files"=> ["json", "string"], "domain"=> ["empty", "string"], "created_at"=> ["empty", "int", "length:13"], "updated_at"=> ["empty", "int", "length:13"], "area_of_expertise" => ["json", "string"], } end |
Instance Method Details
#as_json ⇒ Object
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/models/thinktank_expert.rb', line 80 def as_json return { id: @id, name: @name, title: @title, content: @content, location: @location, area_of_expertise: @area_of_expertise, profile_images: @profile_images, phone: @phone, email: @email, link: @link, audios: @audios, videos: @videos, education: @education, related_topics: @related_topics, site_name: @site_name, site_name_cn: @site_name_cn, domain: @domain, created_at: @created_at, updated_at: @updated_at, source: @source, oss_profile_images: @oss_profile_images, facebook: @facebook, twitter: @twitter, linkedin: @linkedin, instagram: @instagram, wikidata: @wikidata, person_type: @person_type, files: @files, oss_files: @oss_files, associated_program: @associated_program, lang: @lang, website: @website, nationalities: @nationalities, } end |
#to_json ⇒ Object
118 119 120 |
# File 'lib/models/thinktank_expert.rb', line 118 def to_json return as_json.to_json end |