Module: LazyResource::UrlGeneration
- Extended by:
- ActiveSupport::Concern
- Included in:
- Resource, ResourceQueue
- Defined in:
- lib/lazy_resource/url_generation.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #collection_path(options = nil) ⇒ Object
- #collection_url(options = nil) ⇒ Object
- #element_path(options = nil) ⇒ Object
- #element_url(options = nil) ⇒ Object
- #new_element_path ⇒ Object
- #split_options(options = {}) ⇒ Object
Instance Method Details
#collection_path(options = nil) ⇒ Object
18 19 20 |
# File 'lib/lazy_resource/url_generation.rb', line 18 def collection_path( = nil) self.class.collection_path() end |
#collection_url(options = nil) ⇒ Object
22 23 24 25 |
# File 'lib/lazy_resource/url_generation.rb', line 22 def collection_url( = nil) url = self.class.site.to_s.gsub(/\/$/, '') url << self.collection_path() end |
#element_path(options = nil) ⇒ Object
5 6 7 |
# File 'lib/lazy_resource/url_generation.rb', line 5 def element_path( = nil) self.class.element_path(self.primary_key, ) end |
#element_url(options = nil) ⇒ Object
9 10 11 12 |
# File 'lib/lazy_resource/url_generation.rb', line 9 def element_url( = nil) url = self.class.site.to_s.gsub(/\/$/, '') url << self.element_path() end |
#new_element_path ⇒ Object
14 15 16 |
# File 'lib/lazy_resource/url_generation.rb', line 14 def new_element_path self.class.new_element_path end |
#split_options(options = {}) ⇒ Object
27 28 29 |
# File 'lib/lazy_resource/url_generation.rb', line 27 def ( = {}) self.class.() end |