class ContentNetwork::PathParams
Constants
- ATTRS
Public Class Methods
build(params)
click to toggle source
# File lib/content_network/path_params.rb, line 3 def self.build(params) new(params.slice(*ATTRS)) end
new(element_type: 'Entry', section_name: 'all', entry_type: 'all', entry_id: 'all')
click to toggle source
# File lib/content_network/path_params.rb, line 11 def initialize(element_type: 'Entry', section_name: 'all', entry_type: 'all', entry_id: 'all') @element_type = element_type @section_name = section_name @entry_type = entry_type @entry_id = entry_id end
Public Instance Methods
path()
click to toggle source
# File lib/content_network/path_params.rb, line 18 def path [@element_type, @section_name, @entry_type, @entry_id].join('/') end