Class: LabClient::FeatureFlags

Inherits:
Common
  • Object
show all
Defined in:
lib/labclient/feature_flags/list.rb,
lib/labclient/feature_flags/create.rb,
lib/labclient/feature_flags/delete.rb

Overview

Specifics

Constant Summary

Constants included from AccessLevel

AccessLevel::HUMAN_ACCESS_LEVELS, AccessLevel::MACHINE_ACCESS_LEVELS

Instance Attribute Summary

Attributes inherited from Common

#client

Instance Method Summary collapse

Methods inherited from Common

#api_methods, #api_methods_help, #format_id, #format_query_id, #format_query_ids, #format_time?, #group_name, #help, #initialize, #inspect, #klass, #protected_query_access_level, #query_access_level, #query_format_time

Methods included from Docs

#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title

Methods included from AccessLevel

#human_access_level, #human_protected_access_level, #machine_access_level, #machine_protected_access_level

Constructor Details

This class inherits a constructor from LabClient::Common

Instance Method Details

#create(name, query = {}) ⇒ Object

Create



44
45
46
# File 'lib/labclient/feature_flags/create.rb', line 44

def create(name, query = {})
  client.request(:post, "features/#{name}", FeatureFlag, query)
end

#delete(name) ⇒ Object

Delete



19
20
21
# File 'lib/labclient/feature_flags/delete.rb', line 19

def delete(name)
  client.request(:delete, "features/#{name}")
end

#listObject



45
46
47
# File 'lib/labclient/feature_flags/list.rb', line 45

def list
  client.request(:get, 'features', FeatureFlag)
end