Module: Leadlight::ServiceClassMethods
- Defined in:
- lib/leadlight/service_class_methods.rb
Instance Method Summary collapse
- #connection_stack ⇒ Object
- #default_tints ⇒ Object
- #request_class ⇒ Object
- #session(options = {}) ⇒ Object
- #sessions ⇒ Object
- #url(new_url = :none) ⇒ Object
Instance Method Details
#connection_stack ⇒ Object
25 26 27 |
# File 'lib/leadlight/service_class_methods.rb', line 25 def connection_stack @connection_stack ||= ->(builder){} end |
#default_tints ⇒ Object
29 30 31 32 33 |
# File 'lib/leadlight/service_class_methods.rb', line 29 def default_tints [ EnumerableRepresentation::Tint ] end |
#request_class ⇒ Object
35 36 37 |
# File 'lib/leadlight/service_class_methods.rb', line 35 def request_class @request_class ||= Class.new(Request) end |
#session(options = {}) ⇒ Object
15 16 17 |
# File 'lib/leadlight/service_class_methods.rb', line 15 def session(={}) sessions[] end |
#sessions ⇒ Object
19 20 21 22 23 |
# File 'lib/leadlight/service_class_methods.rb', line 19 def sessions @sessions ||= Hash.new{|h,k| h[k] = new(k) } end |
#url(new_url = :none) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/leadlight/service_class_methods.rb', line 7 def url(new_url=:none) if new_url == :none @url ||= Addressable::URI.parse('http://example.com') else @url = Addressable::URI.parse(new_url) end end |