Class: HowLongToBeat::HowLongToBeatEntry
- Inherits:
-
Object
- Object
- HowLongToBeat::HowLongToBeatEntry
- Defined in:
- lib/howlongtobeat/how_long_to_beat_entry.rb
Instance Attribute Summary collapse
-
#all_styles ⇒ Object
Completion times.
-
#completionist ⇒ Object
Completion times.
-
#complexity_lvl_co ⇒ Object
Complexity flags.
-
#complexity_lvl_combine ⇒ Object
Complexity flags.
-
#complexity_lvl_mp ⇒ Object
Complexity flags.
-
#complexity_lvl_sp ⇒ Object
Complexity flags.
-
#coop_time ⇒ Object
Completion times.
-
#game_alias ⇒ Object
Base Game Details.
-
#game_id ⇒ Object
Base Game Details.
-
#game_image_url ⇒ Object
Base Game Details.
-
#game_name ⇒ Object
Base Game Details.
-
#game_type ⇒ Object
Base Game Details.
-
#game_web_link ⇒ Object
Base Game Details.
-
#json_content ⇒ Object
Base Game Details.
-
#main_extra ⇒ Object
Completion times.
-
#main_story ⇒ Object
Completion times.
-
#mp_time ⇒ Object
Completion times.
-
#profile_dev ⇒ Object
Base Game Details.
-
#profile_platforms ⇒ Object
Base Game Details.
-
#release_world ⇒ Object
Base Game Details.
-
#review_score ⇒ Object
Base Game Details.
-
#similarity ⇒ Object
Base Game Details.
Instance Method Summary collapse
-
#initialize ⇒ HowLongToBeatEntry
constructor
A new instance of HowLongToBeatEntry.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ HowLongToBeatEntry
Returns a new instance of HowLongToBeatEntry.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 16 def initialize # Initialize with default values @game_id = -1 @game_name = nil @game_alias = nil @game_type = nil @game_image_url = nil @game_web_link = nil @review_score = nil @profile_dev = nil @profile_platforms = nil @release_world = nil @similarity = -1 @json_content = nil # Completion times @main_story = nil @main_extra = nil @completionist = nil @all_styles = nil @coop_time = nil @mp_time = nil # Complexity flags @complexity_lvl_combine = false @complexity_lvl_sp = false @complexity_lvl_co = false @complexity_lvl_mp = false end |
Instance Attribute Details
#all_styles ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def all_styles @all_styles end |
#completionist ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def completionist @completionist end |
#complexity_lvl_co ⇒ Object
Complexity flags
13 14 15 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 13 def complexity_lvl_co @complexity_lvl_co end |
#complexity_lvl_combine ⇒ Object
Complexity flags
13 14 15 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 13 def complexity_lvl_combine @complexity_lvl_combine end |
#complexity_lvl_mp ⇒ Object
Complexity flags
13 14 15 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 13 def complexity_lvl_mp @complexity_lvl_mp end |
#complexity_lvl_sp ⇒ Object
Complexity flags
13 14 15 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 13 def complexity_lvl_sp @complexity_lvl_sp end |
#coop_time ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def coop_time @coop_time end |
#game_alias ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_alias @game_alias end |
#game_id ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_id @game_id end |
#game_image_url ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_image_url @game_image_url end |
#game_name ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_name @game_name end |
#game_type ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_type @game_type end |
#game_web_link ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def game_web_link @game_web_link end |
#json_content ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def json_content @json_content end |
#main_extra ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def main_extra @main_extra end |
#main_story ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def main_story @main_story end |
#mp_time ⇒ Object
Completion times
9 10 11 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 9 def mp_time @mp_time end |
#profile_dev ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def profile_dev @profile_dev end |
#profile_platforms ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def profile_platforms @profile_platforms end |
#release_world ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def release_world @release_world end |
#review_score ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def review_score @review_score end |
#similarity ⇒ Object
Base Game Details
4 5 6 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 4 def similarity @similarity end |
Instance Method Details
#to_s ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/howlongtobeat/how_long_to_beat_entry.rb', line 46 def to_s times = [] times << "Main Story: #{main_story}h" if main_story times << "Main + Extra: #{main_extra}h" if main_extra times << "Completionist: #{completionist}h" if completionist times << "All Styles: #{all_styles}h" if all_styles times << "Co-op: #{coop_time}h" if coop_time times << "Multiplayer: #{mp_time}h" if mp_time "#{game_name} (ID: #{game_id}) - #{times.join(', ')}" end |