Class: Cheatset::DSL::Cheatsheet

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ Cheatsheet

Returns a new instance of Cheatsheet.



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

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

Instance Attribute Details

#categoriesObject (readonly)

Returns the value of attribute categories.



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

def categories
  @categories
end

Instance Method Details

#category(&block) ⇒ Object



13
14
15
# File 'lib/cheatset/dsl/cheatsheet.rb', line 13

def category(&block)
  @categories << Cheatset::DSL::Category.new(&block)
end