Class: Etna::Clients::Gnomon

Inherits:
BaseClient show all
Defined in:
lib/etna/clients/gnomon/client.rb,
lib/etna/clients/gnomon/models.rb

Defined Under Namespace

Classes: ProjectRulesResponse, Rules

Instance Attribute Summary

Attributes inherited from BaseClient

#host, #ignore_ssl, #token

Instance Method Summary collapse

Methods inherited from BaseClient

#initialize, #safe_parse, #token_expired?, #token_will_expire?

Constructor Details

This class inherits a constructor from Etna::Clients::BaseClient

Instance Method Details

#project_rules(project_name) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/etna/clients/gnomon/client.rb', line 10

def project_rules(project_name)
  json = nil
  @etna_client.get("/gnomon/#{project_name}/rules") do |res|
    json = JSON.parse(res.body)
  end

  ProjectRulesResponse.new(json)
end