Class: Helioth::Features

Inherits:
Object
  • Object
show all
Defined in:
lib/helioth/features.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Features

Returns a new instance of Features.



6
7
8
9
# File 'lib/helioth/features.rb', line 6

def initialize(&block)
  @list = Array.new
  instance_eval(&block)
end

Instance Attribute Details

#listObject

Returns the value of attribute list.



4
5
6
# File 'lib/helioth/features.rb', line 4

def list
  @list
end

Instance Method Details

#feature(name, &block) ⇒ Object



11
12
13
# File 'lib/helioth/features.rb', line 11

def feature(name, &block)
  @list << Feature.new(name, &block)
end