Class: Pbx::Config::Value

Inherits:
Data
  • Object
show all
Defined in:
lib/pbx/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context

Returns:

  • (Object)

    the current value of context



9
10
11
# File 'lib/pbx/config.rb', line 9

def context
  @context
end

#hostObject (readonly)

Returns the value of attribute host

Returns:

  • (Object)

    the current value of host



9
10
11
# File 'lib/pbx/config.rb', line 9

def host
  @host
end

#portObject (readonly)

Returns the value of attribute port

Returns:

  • (Object)

    the current value of port



9
10
11
# File 'lib/pbx/config.rb', line 9

def port
  @port
end

#reconnect_backoffObject (readonly)

Returns the value of attribute reconnect_backoff

Returns:

  • (Object)

    the current value of reconnect_backoff



9
10
11
# File 'lib/pbx/config.rb', line 9

def reconnect_backoff
  @reconnect_backoff
end

#secretObject (readonly)

Returns the value of attribute secret

Returns:

  • (Object)

    the current value of secret



9
10
11
# File 'lib/pbx/config.rb', line 9

def secret
  @secret
end

#userObject (readonly)

Returns the value of attribute user

Returns:

  • (Object)

    the current value of user



9
10
11
# File 'lib/pbx/config.rb', line 9

def user
  @user
end

Instance Method Details

#complete?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/pbx/config.rb', line 10

def complete?
  user.to_s.strip.length.positive? && secret.to_s.strip.length.positive?
end