Sha256: 515a2db2559ccf2293dd3f70c81bb1166ff21e91e0c6a85ffab29de6ff0f86ae
Contents?: true
Size: 826 Bytes
Versions: 5
Compression:
Stored size: 826 Bytes
Contents
# encoding: utf-8 require "adamantium" # Policy Object builder # # @!parse include Policy::Interface module Policy require_relative "policy/version" require_relative "policy/validations" require_relative "policy/violation_error" require_relative "policy/interface" require_relative "policy/follower" class << self # Builds a base class for the policy object with some attributes # # @example # class TransactionPolicy < Policy.new(:debet, :credit) # end # # @param [Array<Symbol>] attributes # names for the policy object attributes # # @return [Struct] def new(*attributes) Struct.new(*attributes) do include Interface def self.name "Policy" end end end end # Policy singleton class end # module Policy
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
policy-1.2.0 | lib/policy.rb |
policy-1.1.0 | lib/policy.rb |
policy-1.0.5 | lib/policy.rb |
policy-1.0.4 | lib/policy.rb |
policy-1.0.1 | lib/policy.rb |