Class: Bearcat::Client::ClientModule::BearcatRequest
- Inherits:
- 
      Struct
      
        - Object
- Struct
- Bearcat::Client::ClientModule::BearcatRequest
 
- Defined in:
- lib/bearcat/client_module.rb
Instance Attribute Summary collapse
- 
  
    
      #arguments  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute arguments. 
- 
  
    
      #parameters  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute parameters. 
- 
  
    
      #url  ⇒ Object 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Returns the value of attribute url. 
Instance Method Summary collapse
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments
| 87 88 89 | # File 'lib/bearcat/client_module.rb', line 87 def arguments @arguments end | 
#parameters ⇒ Object
Returns the value of attribute parameters
| 87 88 89 | # File 'lib/bearcat/client_module.rb', line 87 def parameters @parameters end | 
#url ⇒ Object
Returns the value of attribute url
| 87 88 89 | # File 'lib/bearcat/client_module.rb', line 87 def url @url end | 
Instance Method Details
#interpoated_url ⇒ Object
| 88 89 90 91 92 93 94 95 96 97 98 99 | # File 'lib/bearcat/client_module.rb', line 88 def interpoated_url url.gsub(ARG_REGEX) do |_| m = Regexp.last_match val = arguments[m[1]] val = val.canvas_id if val.respond_to?(:canvas_id) val = val.id if val.respond_to?(:id) val = val['id'].presence || val[:id].presence || val if val.is_a?(Hash) val = val.to_s if val.present? val = URI.encode_www_form_component(val) if val.is_a?(String) val end end |