Sha256: 03e194263a2ad3b8d7c979bf532a1cd0a9a8f16687d5c509a659736d2784a49f
Contents?: true
Size: 703 Bytes
Versions: 2
Compression:
Stored size: 703 Bytes
Contents
require_relative 'representers/changelog_representer' require_relative 'rest_client' require_relative 'resource' module MTG class Changelog < Resource include Roar::JSON include RestClient include ChangelogRepresenter attr_accessor :version, :details, :release_date # Get all changelogs # # @return [Array<Changelog>] Array of Changelog objects def self.all changelogs = [] response = RestClient.get('changelogs') data = response.body['changelogs'] data.each do |changelog| changelogs << new.extend(ChangelogRepresenter).from_json(changelog.to_json) end @query = nil changelogs end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mtg_sdk-1.0.1 | lib/mtg_sdk/changelog.rb |
mtg_sdk-1.0.0 | lib/mtg_sdk/changelog.rb |