Skip to content

Commit

Permalink
workaround for molybdenum-99/reality#71
Browse files Browse the repository at this point in the history
  • Loading branch information
ragesoss committed Nov 23, 2018
1 parent a6a93e8 commit 3eba5b9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion encyclopedia.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,16 @@ class OriginStory
def initialize(sparql, entry)
@sparql = sparql
@entry = entry
set_occupation
@disease = @sparql.diseases.keys.sample
end

def set_occupation
@occupation = @sparql.old_occupations.keys.sample
@occupation_q_number = @sparql.old_occupations[@occupation]
@occupation_entity = Reality.wikidata.get(@occupation_q_number)
@disease = @sparql.diseases.keys.sample
rescue
retry
end

def generate
Expand Down

0 comments on commit 3eba5b9

Please sign in to comment.