Class: Radiustar::Vendor
Constant Summary
Constants included
from Radiustar
LIBPATH, PATH
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Radiustar
#inspect, libpath, path, require_all_libs_relative_to, version
Constructor Details
#initialize(name, id) ⇒ Vendor
Returns a new instance of Vendor.
32
33
34
35
36
|
# File 'lib/radiustar/vendor.rb', line 32
def initialize(name, id)
@name = name
@id = id
@attributes = AttributesCollection.new self
end
|
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
30
31
32
|
# File 'lib/radiustar/vendor.rb', line 30
def id
@id
end
|
#name ⇒ Object
Returns the value of attribute name.
30
31
32
|
# File 'lib/radiustar/vendor.rb', line 30
def name
@name
end
|
Instance Method Details
#add_attribute(name, id, type) ⇒ Object
38
39
40
|
# File 'lib/radiustar/vendor.rb', line 38
def add_attribute(name, id, type)
@attributes.add(name, id, type)
end
|
#attributes ⇒ Object
54
55
56
|
# File 'lib/radiustar/vendor.rb', line 54
def attributes
@attributes
end
|
#find_attribute_by_id(id) ⇒ Object
46
47
48
|
# File 'lib/radiustar/vendor.rb', line 46
def find_attribute_by_id(id)
@attributes.find_by_id(id.to_i)
end
|
#find_attribute_by_name(name) ⇒ Object
42
43
44
|
# File 'lib/radiustar/vendor.rb', line 42
def find_attribute_by_name(name)
@attributes.find_by_name(name)
end
|
#has_attributes? ⇒ Boolean
50
51
52
|
# File 'lib/radiustar/vendor.rb', line 50
def has_attributes?
!@attributes.empty?
end
|