Class: Logux::Client
- Inherits:
- 
      Object
      
        - Object
- Logux::Client
 
- Includes:
- Test::Client
- Defined in:
- lib/logux/client.rb
Instance Attribute Summary collapse
- 
  
    
      #logux_host  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute logux_host. 
Instance Method Summary collapse
- #client ⇒ Object
- 
  
    
      #initialize(logux_host: Logux.configuration.logux_host)  ⇒ Client 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Client. 
- #post(params) ⇒ Object
Constructor Details
Instance Attribute Details
#logux_host ⇒ Object (readonly)
Returns the value of attribute logux_host.
| 5 6 7 | # File 'lib/logux/client.rb', line 5 def logux_host @logux_host end | 
Instance Method Details
#client ⇒ Object
| 17 18 19 | # File 'lib/logux/client.rb', line 17 def client @client ||= RestClient::Resource.new(logux_host, verify_ssl: false) end | 
#post(params) ⇒ Object
| 11 12 13 14 15 | # File 'lib/logux/client.rb', line 11 def post(params) client.post(params.to_json, content_type: :json, accept: :json) end |