Class: Cheatset::DSL::Category

Inherits:
Base
  • Object
show all
Defined in:
lib/cheatset/dsl/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Category

Returns a new instance of Category.



8
9
10
11
# File 'lib/cheatset/dsl/category.rb', line 8

def initialize(&block)
  @entries = []
  super(&block)
end

Instance Attribute Details

#entriesObject (readonly)

Returns the value of attribute entries.



4
5
6
# File 'lib/cheatset/dsl/category.rb', line 4

def entries
  @entries
end

Instance Method Details

#entry(&block) ⇒ Object



12
13
14
# File 'lib/cheatset/dsl/category.rb', line 12

def entry(&block)
  @entries << Cheatset::DSL::Entry.new(&block)
end