Class: Blacklight::Routes::Exportable
- Inherits:
-
Object
- Object
- Blacklight::Routes::Exportable
- Defined in:
- lib/blacklight/routes/exportable.rb
Instance Method Summary collapse
- #call(mapper, options = {}) ⇒ Object
-
#initialize(defaults = {}) ⇒ Exportable
constructor
A new instance of Exportable.
Constructor Details
#initialize(defaults = {}) ⇒ Exportable
Returns a new instance of Exportable.
5 6 7 |
# File 'lib/blacklight/routes/exportable.rb', line 5 def initialize(defaults = {}) @defaults = defaults end |
Instance Method Details
#call(mapper, options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/blacklight/routes/exportable.rb', line 9 def call(mapper, = {}) = @defaults.merge() mapper.member do mapper.match 'email', via: [:get, :post] mapper.match 'sms', via: [:get, :post] mapper.get 'citation' end mapper.collection do mapper.match 'email', via: [:get, :post] mapper.match 'sms', via: [:get, :post] mapper.get 'citation' end end |