Module: Card::Set::Abstract::PagingParams::Format

Extended by:
Card::Set::AbstractFormat
Defined in:
tmpsets/set/mod008-pointer/abstract/00_paging_params.rb

Instance Method Summary collapse

Instance Method Details

#contextual_param(param) ⇒ Object



17
18
19
# File 'tmpsets/set/mod008-pointer/abstract/00_paging_params.rb', line 17

def contextual_param param
  env_search_param(param) || voo_search_param(param)
end

#env_search_param(param) ⇒ Object



21
22
23
24
25
26
# File 'tmpsets/set/mod008-pointer/abstract/00_paging_params.rb', line 21

def env_search_param param
  return unless focal?

  val = Env.params[param]
  val.present? && val.to_i
end

#limit_paramObject



9
10
11
# File 'tmpsets/set/mod008-pointer/abstract/00_paging_params.rb', line 9

def limit_param
  @limit ||= contextual_param(:limit) || default_limit
end

#offset_paramObject



13
14
15
# File 'tmpsets/set/mod008-pointer/abstract/00_paging_params.rb', line 13

def offset_param
  @offset ||= contextual_param(:offset) || 0
end

#voo_search_param(param) ⇒ Object



28
29
30
31
32
# File 'tmpsets/set/mod008-pointer/abstract/00_paging_params.rb', line 28

def voo_search_param param
  return unless voo&.wql

  voo.wql[param]
end