Class: Restiny::Manifest
- Inherits:
-
Object
- Object
- Restiny::Manifest
- Defined in:
- lib/restiny/manifest.rb
Constant Summary collapse
- ENTITIES =
{ Achievement: %w[achievement achievements], Activity: %w[activity activities], ActivityGraph: %w[activity_graph activity_graphs], ActivityMode: %w[activity_mode activity_modes], ActivityModifier: %w[activity_modifier activity_modifiers], ActivityType: %w[activity_type activity_types], Artifact: %w[artifact artifacts], Bond: %w[bonds bonds], BreakerType: %w[breaker_type breaker_types], Checklist: %w[checklist checklists], Class: %w[guardian_class guardian_classes], Collectible: %w[collectible collectibles], DamageType: %w[damage_type damage_types], Destination: %w[destination destinations], EnergyType: %w[energy_type energy_types], EquipmentSlot: %w[equipment_slot equipment_slots], EventCard: %w[event_card event_cards], Faction: %w[faction factions], Gender: %w[guardian_gender guardian_genders], GuardianRank: %w[guardian_rank guardian_ranks], GuardianRankConstants: %w[guardian_rank_constant guardian_rank_constants], HistoricalStats: %w[historical_stat historical_stats], InventoryBucket: %w[inventory_bucket inventory_buckets], InventoryItem: %w[inventory_item inventory_items], ItemCategory: %w[item_category item_categories], ItemTierType: %w[item_tier_type item_tier_types], LoadoutColor: %w[loadout_color loadout_colors], LoadoutConstants: %w[loadout_constant loadout_constants], LoadoutIcon: %w[loadout_icon loadout_icons], LoadoutName: %w[loadout_name loadout_names], Location: %w[location locations], Lore: %w[lore_entry lore_entries], MaterialRequirementSet: %w[material_requirement_set material_requirement_sets], MedalTier: %w[medal_tier medal_tiers], Metric: %w[metric metrics], Milestone: %w[milestone milestones], Objective: %w[objective objectives], Place: %w[place places], PlugSet: %w[plug_set plug_sets], PowerCap: %w[power_cap power_caps], PresentationNode: %w[presentation_node presentation_nodes], Progression: %w[progression progressions], ProgressionLevelRequirement: %w[progression_level_requirement progression_level_requirements], Race: %w[guardian_race guardian_races], Record: %w[record records], ReportReasonCategory: %w[report_reason_category report_reason_categories], RewardSource: %w[reward_source reward_sources], SackRewardItemList: %w[sack_reward_item_list sack_reward_item_lists], SandboxPattern: %w[sandbox_pattern sandbox_patterns], SandboxPerk: %w[sandbox_perk sandbox_perks], Season: %w[season seasons], SeasonPass: %w[season_pass season_passes], SocialCommendation: %w[commendation commendations], SocialCommendationNode: %w[commendation_node commendation_nodes], SocketCategory: %w[socket_category socket_categories], SocketType: %w[socket_type socket_types], Stat: %w[stat stats], StatGroup: %w[stat_group stat_groups], TalentGrid: %w[talent_grid talent_grids], Trait: %w[trait traits], Unlock: %w[unlock unlocks], Vendor: %w[vendor vendors], VendorGroup: %w[vendor_group vendor_groups] }.freeze
Instance Attribute Summary collapse
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(file_path, version) ⇒ Manifest
constructor
A new instance of Manifest.
Constructor Details
#initialize(file_path, version) ⇒ Manifest
Returns a new instance of Manifest.
83 84 85 86 87 88 89 90 |
# File 'lib/restiny/manifest.rb', line 83 def initialize(file_path, version) if file_path.empty? || !File.exist?(file_path) || !File.file?(file_path) raise Restiny::InvalidParamsError, 'You must provide a valid path for the manifest file' end @database = SQLite3::Database.new(file_path, results_as_hash: true) @version = version end |
Instance Attribute Details
#version ⇒ Object (readonly)
Returns the value of attribute version.
73 74 75 |
# File 'lib/restiny/manifest.rb', line 73 def version @version end |