Module: Sapphire::DSL::Profiles
- Defined in:
- lib/sapphire/DSL/Profiles/Table.rb,
lib/sapphire/DSL/Profiles/Profile.rb
Defined Under Namespace
Classes: Profile
Instance Method Summary collapse
Instance Method Details
#Profile(name, &block) ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/sapphire/DSL/Profiles/Profile.rb', line 4 def Profile(name, &block) $profiles ||= {} $currentProfile = Profile.new(name) $profiles.merge! name => $currentProfile block.call() $currentProfile = nil end |
#Table(name, &block) ⇒ Object
4 5 6 |
# File 'lib/sapphire/DSL/Profiles/Table.rb', line 4 def Table(name, &block) $currentProfile.Add(name => block) end |