Module: Restful::Configuration

Extended by:
Configuration
Included in:
Configuration
Defined in:
lib/dm-restful-adapter/configuration.rb

Instance Method Summary collapse

Instance Method Details

#backendObject



5
6
7
# File 'lib/dm-restful-adapter/configuration.rb', line 5

def backend
  @backend ||= Backends::Typhoeus
end

#backend=(backend) ⇒ Object



9
10
11
# File 'lib/dm-restful-adapter/configuration.rb', line 9

def backend=(backend)
  @backend = backend
end

#domainObject



13
14
15
# File 'lib/dm-restful-adapter/configuration.rb', line 13

def domain
  @domain or raise 'You must define a domain: Restful::Configuration.domain = "www.example.com"'
end

#domain=(domain) ⇒ Object



17
18
19
# File 'lib/dm-restful-adapter/configuration.rb', line 17

def domain=(domain)
  @domain = domain
end

#parserObject



21
22
23
# File 'lib/dm-restful-adapter/configuration.rb', line 21

def parser
  @parser ||= MultiJson
end

#parser=(parser) ⇒ Object



25
26
27
# File 'lib/dm-restful-adapter/configuration.rb', line 25

def parser=(parser)
  @parser = parser
end