Class: OpenID::AX::AttrInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/openid/extensions/ax.rb

Overview

Represents a single attribute in an attribute exchange request. This should be added to an Request object in order to request the attribute.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type_uri, ns_alias = nil, required = false, count = 1) ⇒ AttrInfo

Returns a new instance of AttrInfo.



81
82
83
84
85
86
# File 'lib/openid/extensions/ax.rb', line 81

def initialize(type_uri, ns_alias=nil, required=false, count=1)
  @type_uri = type_uri
  @count = count
  @required = required
  @ns_alias = ns_alias
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



79
80
81
# File 'lib/openid/extensions/ax.rb', line 79

def count
  @count
end

#ns_aliasObject (readonly)

Returns the value of attribute ns_alias.



79
80
81
# File 'lib/openid/extensions/ax.rb', line 79

def ns_alias
  @ns_alias
end

#requiredObject

Returns the value of attribute required.



80
81
82
# File 'lib/openid/extensions/ax.rb', line 80

def required
  @required
end

#type_uriObject (readonly)

Returns the value of attribute type_uri.



79
80
81
# File 'lib/openid/extensions/ax.rb', line 79

def type_uri
  @type_uri
end

Instance Method Details

#wants_unlimited_values?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/openid/extensions/ax.rb', line 88

def wants_unlimited_values?
  @count == UNLIMITED_VALUES
end