Sha256: 62eb7d32f58665e2d401fdfd1a94ee6db4ef766847af0910fbd4294100293ef0
Contents?: true
Size: 671 Bytes
Versions: 6
Compression:
Stored size: 671 Bytes
Contents
# frozen_string_literal: true require 'i18n_config' require 'fuser/version' require 'fuser/configuration' require 'fuser/endpoint' require 'fuser/request' require 'fuser/response' module Fuser class << self attr_accessor :configuration end def self.configure self.configuration ||= Configuration.new yield(configuration) end def self.call(action, params) request = Fuser::Request.call(action, params: params) Fuser::Response.new(request.response, action: action) end I18n.t('fuser.endpoints').keys.each do |request_action| define_singleton_method request_action do |params| call(request_action, params) end end end
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
fuser-0.2.0 | lib/fuser.rb |
fuser-0.1.4 | lib/fuser.rb |
fuser-0.1.3 | lib/fuser.rb |
fuser-0.1.2 | lib/fuser.rb |
fuser-0.1.1 | lib/fuser.rb |
fuser-0.1.0 | lib/fuser.rb |