Top Level Namespace
Defined Under Namespace
Modules: Bakery, Dispatcher Classes: Object, PathSearch
Instance Method Summary collapse
- #authors(*names) ⇒ Object (also: #author)
- #copyright(*lines) ⇒ Object
- #defaultAuthors(*names) ⇒ Object (also: #defaultAuthor)
- #defaultCopyright(*lines) ⇒ Object
- #defaultDescription(*desc) ⇒ Object
- #description(*desc) ⇒ Object
-
#ingredients(associations) ⇒ Object
(also: #ingredient)
Copyright © 2013 Nathan Currier.
-
#load_if_exists(name) ⇒ Object
Copyright © 2013 Nathan Currier.
- #loadIcing(filename) ⇒ Object
-
#name(n) ⇒ Object
Copyright © 2013 Nathan Currier.
- #summary(*sum) ⇒ Object
- #use_defaults ⇒ Object
Instance Method Details
#authors(*names) ⇒ Object Also known as:
22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/bakery/dsl.rb', line 22 def *names if Bakery.getCake.icing[:authors] == nil Bakery::Log.debug "authors set: #{names}" Bakery.getCake.icing[:authors] = Array.new else Bakery::Log.debug "authors concatenated: #{names}" end Bakery.getCake.icing[:authors].concat names end |
#copyright(*lines) ⇒ Object
60 61 62 63 64 65 66 67 68 |
# File 'lib/bakery/dsl.rb', line 60 def copyright *lines if Bakery.icing[:copyright] == nil Bakery::Log.debug "copyright set: #{lines}" else Bakery::Log.debug "copyright overwritten: #{lines}" end Bakery.getCake.icing[:copyright] = lines end |
#defaultAuthors(*names) ⇒ Object Also known as: defaultAuthor
70 71 72 73 74 75 76 77 78 |
# File 'lib/bakery/dsl.rb', line 70 def defaultAuthors *names if Bakery.icing[:authors] == nil Bakery::Log.debug "default author set: #{names}" else Bakery::Log.debug "default author overwritten: #{names}" end Bakery.icing[:authors] = names end |
#defaultCopyright(*lines) ⇒ Object
82 83 84 85 86 87 88 89 90 |
# File 'lib/bakery/dsl.rb', line 82 def defaultCopyright *lines if Bakery.icing[:copyright] == nil Bakery::Log.debug "default copyright set: #{lines}" else Bakery::Log.debug "default copyright overwritten: #{lines}" end Bakery.icing[:copyright] = lines end |
#defaultDescription(*desc) ⇒ Object
92 93 94 95 96 97 98 99 100 |
# File 'lib/bakery/dsl.rb', line 92 def defaultDescription *desc if Bakery.icing[:description] == nil Bakery::Log.debug "default description set: #{desc}" else Bakery::Log.debug "default description overwritten: #{desc}" end Bakery.icing[:description] = desc end |
#description(*desc) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/bakery/dsl.rb', line 36 def description *desc if Bakery.getCake.icing[:description] == nil Bakery::Log.debug "description set: #{desc}" Bakery.getCake.icing[:description] = Array.new else Bakery::Log.debug "description concatenated: #{desc}" end Bakery.getCake.icing[:description].concat desc end |
#ingredients(associations) ⇒ Object Also known as: ingredient
Copyright © 2013 Nathan Currier
Use, modification, and distribution are all subject to the Boost Software License, Version 1.0. (See the accompanying file LICENSE.md or at rideliner.tk/LICENSE.html).
<description>
12 13 14 15 16 17 18 |
# File 'lib/bakery/ingredient.rb', line 12 def ingredients associations associations.each_pair { |func, klass| global_function func do |*args, &block| klass.new *args, &block end } end |
#load_if_exists(name) ⇒ Object
Copyright © 2013 Nathan Currier
Use, modification, and distribution are all subject to the Boost Software License, Version 1.0. (See the accompanying file LICENSE.md or at rideliner.tk/LICENSE.html).
<description>
12 13 14 15 16 17 18 |
# File 'lib/bakery/detail/load.rb', line 12 def load_if_exists name if File.exists? name load name else Bakery::Log.debug "could not load file: #{name}" end end |
#loadIcing(filename) ⇒ Object
102 103 104 105 106 107 |
# File 'lib/bakery/dsl.rb', line 102 def loadIcing filename Bakery::ICING_SEARCH.search(filename) { |file| Bakery::Log.info "loading icing: #{file}" load file } end |
#name(n) ⇒ Object
Copyright © 2013 Nathan Currier
Use, modification, and distribution are all subject to the Boost Software License, Version 1.0. (See the accompanying file LICENSE.md or at rideliner.tk/LICENSE.html).
<description>
12 13 14 15 16 17 18 19 20 |
# File 'lib/bakery/dsl.rb', line 12 def name n if Bakery.getCake.icing[:name] == nil Bakery::Log.debug "name set: #{n}" else Bakery::Log.debug "name overwritten: #{n}" end Bakery.getCake.icing[:name] = n end |
#summary(*sum) ⇒ Object
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/bakery/dsl.rb', line 48 def summary *sum if Bakery.getCake.icing[:summary] == nil Bakery::Log.debug "summary set: #{sum}" Bakery.getCake.icing[:summary] = Array.new else Bakery::Log.debug "summary concatenated: #{sum}" end Bakery.getCake.icing[:summary].concat sum end |