Class: DomainList

Inherits:
Object
  • Object
show all
Defined in:
lib/vamboo/domainlist.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ DomainList

Returns a new instance of DomainList.



16
17
18
19
# File 'lib/vamboo/domainlist.rb', line 16

def initialize(&block)
	@list = []
	instance_eval(&block)
end

Instance Attribute Details

#listObject (readonly)

Returns the value of attribute list.



9
10
11
# File 'lib/vamboo/domainlist.rb', line 9

def list
  @list
end

Class Method Details

.define(&block) ⇒ Object



10
11
12
13
14
# File 'lib/vamboo/domainlist.rb', line 10

def self.define(&block)
	domainList = DomainList.new(&block)
	list = domainList.list
	list
end

Instance Method Details

#add(name, rotation) ⇒ Object



21
22
23
# File 'lib/vamboo/domainlist.rb', line 21

def add(name, rotation)
	@list.push(Domain.new(name, rotation))		
end