Method: Chef::ApiClientV1#name

Defined in:
lib/chef/api_client_v1.rb

#name(arg = nil) ⇒ String

Gets or sets the client name.

Parameters:

  • arg (Optional String) (defaults to: nil)

    The name must be alpha-numeric plus - and _.

Returns:

  • (String)

    The current value of the name.



79
80
81
82
83
84
85
# File 'lib/chef/api_client_v1.rb', line 79

def name(arg = nil)
  set_or_return(
    :name,
    arg,
    regex: /^[\-[:alnum:]_\.]+$/
  )
end