Class: Splunk::UserNamespace

Inherits:
Object
  • Object
show all
Includes:
Namespace
Defined in:
lib/splunk-sdk-ruby/namespace.rb

Overview

:nodoc:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user, app) ⇒ UserNamespace

Returns a new instance of UserNamespace.



221
222
223
224
# File 'lib/splunk-sdk-ruby/namespace.rb', line 221

def initialize(user, app)
  @user = user
  @app = app
end

Instance Attribute Details

#appObject (readonly)

Returns the value of attribute app.



219
220
221
# File 'lib/splunk-sdk-ruby/namespace.rb', line 219

def app
  @app
end

#userObject (readonly)

Returns the value of attribute user.



219
220
221
# File 'lib/splunk-sdk-ruby/namespace.rb', line 219

def user
  @user
end

Instance Method Details

#==(other) ⇒ Object



226
227
228
229
# File 'lib/splunk-sdk-ruby/namespace.rb', line 226

def ==(other)
  other.is_a?(UserNamespace) && @app == other.app &&
      @user == other.user
end

#is_exact?Boolean

Returns:

  • (Boolean)


231
232
233
# File 'lib/splunk-sdk-ruby/namespace.rb', line 231

def is_exact?()
  (@app != "-") && (@user != "-")
end

#to_path_fragmentObject



235
236
237
# File 'lib/splunk-sdk-ruby/namespace.rb', line 235

def to_path_fragment()
  ["servicesNS", @user, @app]
end