Class: Icarus::Mod::Tools::Toolinfo
- Defined in:
- lib/icarus/mod/tools/toolinfo.rb
Overview
Sync methods
Constant Summary collapse
- HASHKEYS =
%i[name author version compatibility description fileType fileURL imageURL readmeURL].freeze
Instance Attribute Summary
Attributes inherited from Baseinfo
#created_at, #data, #id, #updated_at
Instance Method Summary collapse
-
#fileType ⇒ Object
rubocop:disable Naming/MethodName.
-
#to_h ⇒ Object
rubocop:enable Naming/MethodName.
Methods inherited from Baseinfo
#author_id, #errors, #errors?, #file_types, #file_urls, #initialize, #method_missing, #read, #respond_to_missing?, #status, #to_json, #uniq_name, #valid?, #warnings, #warnings?
Constructor Details
This class inherits a constructor from Icarus::Mod::Tools::Baseinfo
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Icarus::Mod::Tools::Baseinfo
Instance Method Details
#fileType ⇒ Object
rubocop:disable Naming/MethodName
13 14 15 |
# File 'lib/icarus/mod/tools/toolinfo.rb', line 13 def fileType @data[:fileType] || "zip" end |
#to_h ⇒ Object
rubocop:enable Naming/MethodName
18 19 20 |
# File 'lib/icarus/mod/tools/toolinfo.rb', line 18 def to_h HASHKEYS.each_with_object({}) { |key, hash| hash[key] = @data[key] } end |