Class: XIVLodestone::CollectableList
- Inherits:
-
Object
- Object
- XIVLodestone::CollectableList
- Defined in:
- lib/xiv_lodestone/lodestone_character_collectable.rb
Defined Under Namespace
Classes: Collectable
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Instance Method Summary collapse
-
#initialize(collectable_path) ⇒ CollectableList
constructor
A new instance of CollectableList.
-
#to_json ⇒ Object
Uses gem Oj to dump MountList to JSON.
Constructor Details
#initialize(collectable_path) ⇒ CollectableList
Returns a new instance of CollectableList.
10 11 12 13 |
# File 'lib/xiv_lodestone/lodestone_character_collectable.rb', line 10 def initialize(collectable_path) @list = [] parse_collectable(collectable_path) end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
6 7 8 |
# File 'lib/xiv_lodestone/lodestone_character_collectable.rb', line 6 def list @list end |
Instance Method Details
#to_json ⇒ Object
Uses gem Oj to dump MountList to JSON
15 16 17 |
# File 'lib/xiv_lodestone/lodestone_character_collectable.rb', line 15 def to_json() @list.map { |obj| Hash[obj.each_pair.to_a] }.to_json end |