class 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>
Public Instance Methods
# 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
# 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
# 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
# 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
# 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
# File lib/bakery/detail/global_function.rb, line 13 def global_function name, &block Bakery::Log.debug "create global function: #{name.to_s}" self.class.send :define_method, name, &block end
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>
# 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
# 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
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>
# 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
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>
# 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
# 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
# File lib/bakery/ingredient.rb, line 22 def use_defaults load File.join(Bakery::LIB_DIR, 'default.ingredients') end