Sha256: 0e35a0b8db8cf796d048d894b9280ccfddeecec10b030637e8f1f1b2c7757f52
Contents?: true
Size: 658 Bytes
Versions: 10
Compression:
Stored size: 658 Bytes
Contents
module Vertebrae class API include Request attr_accessor :connection, :initialisation_options # Create new API # def initialize(options={}, &block) self.initialisation_options = options options = default_options.merge(options) yield_or_eval(&block) if block_given? self.connection = Connection.new(options) self.connection.configuration.process_basic_auth(options[:basic_auth]) setup end def setup end def default_options {} end def yield_or_eval(&block) return unless block block.arity > 0 ? yield(self) : self.instance_eval(&block) end end end
Version data entries
10 entries across 10 versions & 1 rubygems