Class: DomainList
- Inherits:
-
Object
- Object
- DomainList
- Defined in:
- lib/vamboo/domainlist.rb
Instance Attribute Summary collapse
-
#list ⇒ Object
readonly
Returns the value of attribute list.
Class Method Summary collapse
Instance Method Summary collapse
- #add(name) ⇒ Object
-
#initialize(&block) ⇒ DomainList
constructor
A new instance of DomainList.
Constructor Details
#initialize(&block) ⇒ DomainList
Returns a new instance of DomainList.
15 16 17 18 |
# File 'lib/vamboo/domainlist.rb', line 15 def initialize(&block) @list = [] instance_eval(&block) end |
Instance Attribute Details
#list ⇒ Object (readonly)
Returns the value of attribute list.
8 9 10 |
# File 'lib/vamboo/domainlist.rb', line 8 def list @list end |
Class Method Details
.define(&block) ⇒ Object
9 10 11 12 13 |
# File 'lib/vamboo/domainlist.rb', line 9 def self.define(&block) domainList = DomainList.new(&block) list = domainList.list list end |
Instance Method Details
#add(name) ⇒ Object
20 21 22 |
# File 'lib/vamboo/domainlist.rb', line 20 def add(name) @list.push(Domain.new(name)) end |