module Prtscr

Main module

Constants

VERSION

Public Class Methods

get(params) click to toggle source
# File lib/prtscr.rb, line 19
def self.get(params)
  # TODO: Move default values to initializer
  data = {
    version: 'v3', width: '1280', height: '1024', scale: '500',
    format: 'jpg', timestamp: Time.now.to_i, scheme: 'https:/', host: 'prtscr.ru'
  }.merge(params)

  case data[:version]
  when 'v1' then v1(data)
  when 'v2' then v2(data)
  when 'v3' then v3(data)
  end
end