class Cheatset::DSL::Context

Public Class Methods

new(filename) click to toggle source
# File lib/cheatset/dsl/context.rb, line 4
def initialize(filename)
  instance_eval(File.read(filename), File.expand_path(filename))
  @filename = filename
end

Public Instance Methods

generate() click to toggle source
# File lib/cheatset/dsl/context.rb, line 8
def generate
  Cheatset::Creator.new(@data, @filename).generate
end

Private Instance Methods

cheatsheet(&block) click to toggle source
# File lib/cheatset/dsl/context.rb, line 13
def cheatsheet(&block)
  @data = Cheatset::DSL::Cheatsheet.new(&block)
end