Class: DevSystem::SimpleGenerator::UnitHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/dev_system/sub/generator/generators/simple_generator.rb

Overview

helper classes

Instance Method Summary collapse

Instance Method Details

#section(name, section = {}) ⇒ Object



121
122
123
124
# File 'lib/dev_system/sub/generator/generators/simple_generator.rb', line 121

def section name, section = {}
  sections << section
  section[:name] = name
end

#sectionsObject



133
134
135
# File 'lib/dev_system/sub/generator/generators/simple_generator.rb', line 133

def sections
  @sections ||= []
end

#view(name, view = {}) ⇒ Object



126
127
128
129
130
131
# File 'lib/dev_system/sub/generator/generators/simple_generator.rb', line 126

def view name, view = {}
  views << view
  view[:name] = name
  view[:key] ||= name
  view[:format] ||= :rb
end

#viewsObject



137
138
139
# File 'lib/dev_system/sub/generator/generators/simple_generator.rb', line 137

def views
  @views ||= []
end