Class: RadiusRB::Vendor
Constant Summary
Constants included
from RadiusRB
LIBPATH, PATH
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from RadiusRB
libpath, path, require_all_libs_relative_to
Constructor Details
#initialize(name, id) ⇒ Vendor
Returns a new instance of Vendor.
49
50
51
52
53
|
# File 'lib/radiusrb/vendor.rb', line 49
def initialize(name, id)
@name = name
@id = id
@attributes = AttributesCollection.new self
end
|
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
47
48
49
|
# File 'lib/radiusrb/vendor.rb', line 47
def id
@id
end
|
#name ⇒ Object
Returns the value of attribute name.
47
48
49
|
# File 'lib/radiusrb/vendor.rb', line 47
def name
@name
end
|
Instance Method Details
#add_attribute(name, id, type) ⇒ Object
55
56
57
|
# File 'lib/radiusrb/vendor.rb', line 55
def add_attribute(name, id, type)
@attributes.add(name, id, type)
end
|
#attributes ⇒ Object
71
72
73
|
# File 'lib/radiusrb/vendor.rb', line 71
def attributes
@attributes
end
|
#find_attribute_by_id(id) ⇒ Object
63
64
65
|
# File 'lib/radiusrb/vendor.rb', line 63
def find_attribute_by_id(id)
@attributes.find_by_id(id.to_i)
end
|
#find_attribute_by_name(name) ⇒ Object
59
60
61
|
# File 'lib/radiusrb/vendor.rb', line 59
def find_attribute_by_name(name)
@attributes.find_by_name(name)
end
|
#has_attributes? ⇒ Boolean
67
68
69
|
# File 'lib/radiusrb/vendor.rb', line 67
def has_attributes?
!@attributes.empty?
end
|