module PlayStoreInfo::Readers

Public Class Methods

included(base) click to toggle source
# File lib/play_store_info/readers.rb, line 5
def self.included(base)
  base.extend ClassMethods
end

Public Instance Methods

scrape_data() click to toggle source
# File lib/play_store_info/readers.rb, line 9
def scrape_data
  self.class.accessors.each do |field, _|
    instance_variable_set("@#{field}", send("read_#{field}"))
  end
end
to_hash() click to toggle source
# File lib/play_store_info/readers.rb, line 19
def to_hash
  Hash[self.class.accessors.map { |field| [field.to_sym, send(field)] }]
end
to_json(*options) click to toggle source
# File lib/play_store_info/readers.rb, line 15
def to_json(*options)
  to_hash.to_json(*options)
end