Sha256: 3c81fcfbd7cc72d725fee87ea5a7b201e9f1f9bc66ad0ef77b063fd2578ce787

Contents?: true

Size: 746 Bytes

Versions: 2

Compression:

Stored size: 746 Bytes

Contents

module Fastbill
  module Automatic
    class Base
      include Fastbill::Automatic::Services::Get
      include Fastbill::Automatic::Services::Create

      attr_accessor :attributes

      @@request_infos = []

      def self.request_infos 
        @@request_infos
      end

      def self.request_infos=(info_array)
        @@request_infos = info_array
      end

      def self.clear_request_infos 
        @@request_infos = []
      end

      def initialize(attributes = {})
        self.attributes = attributes
        set_attributes(attributes)
      end

      def set_attributes(attributes)
        attributes.each_pair do |key, value|
          instance_variable_set("@#{key.downcase}", value)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fastbill-automatic-0.0.4 lib/fastbill-automatic/base.rb
fastbill-automatic-0.0.3 lib/fastbill-automatic/base.rb