Sha256: 6da55df49fdbed203fcc3bce53ddefc20fb344d0e309527f02469184c5db8d3b
Contents?: true
Size: 1.1 KB
Versions: 36
Compression:
Stored size: 1.1 KB
Contents
require 'client/helpers/method_builder' require 'client/template/model/common_methods' require 'client/template/model/instance_methods' module Mirage class Template module Model class << self def extended clazz clazz.extend(CommonMethods) clazz.extend(Helpers::MethodBuilder) clazz.send(:include, HTTParty) clazz.send(:include, CommonMethods) clazz.send(:include, InstanceMethods) mod = Module.new do def initialize *args super *args [:content_type, :http_method, :default, :status, :delay, :required_parameters, :required_body_content, :required_headers, :headers, :endpoint, :delay].each do |attribute| eval("#{attribute} self.class.#{attribute} if self.class.#{attribute}") end end end clazz.send(:include, mod) clazz.format :json clazz end end end end end
Version data entries
36 entries across 36 versions & 2 rubygems