Class: Hosum::Subject
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Attributes inherited from Container
#children, #ips_list, #options, #parent
Instance Method Summary collapse
Methods inherited from Container
Constructor Details
This class inherits a constructor from Hosum::Container
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/hosum/subject.rb', line 4 def name @name end |
Instance Method Details
#to_dnsmasq(options = {}) ⇒ Object
10 11 12 |
# File 'lib/hosum/subject.rb', line 10 def to_dnsmasq( = {}) "\n# #{self.parent.name}.#{self.name}\n" + children.map{ |c| c.to_dnsmasq() }.join end |
#to_hosts(options = {}) ⇒ Object
6 7 8 |
# File 'lib/hosum/subject.rb', line 6 def to_hosts( = {}) "\n# #{self.parent.name}.#{self.name}\n" + children.map{ |c| c.to_hosts() }.join end |