Module: Tokamak
- Defined in:
- lib/tokamak.rb,
lib/tokamak/hook.rb,
lib/tokamak/errors.rb,
lib/tokamak/builder.rb,
lib/tokamak/recipes.rb,
lib/tokamak/version.rb,
lib/tokamak/hook/tilt.rb,
lib/tokamak/hook/rails.rb,
lib/tokamak/builder/xml.rb,
lib/tokamak/builder/base.rb,
lib/tokamak/builder/json.rb,
lib/tokamak/hook/sinatra.rb,
lib/tokamak/builder/values.rb
Overview
Lib
Defined Under Namespace
Modules: Builder, Hook, VERSION Classes: BuilderError, Recipes
Class Method Summary collapse
Class Method Details
.builder_lookup(media_type) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/tokamak.rb', line 9 def self.builder_lookup(media_type) builder = Tokamak::Builder::Base.global_media_types[media_type[/^([^\s\;]+)/, 1]] builder.nil? ? (raise Tokamak::BuilderError.new("Could not find a builder for the media type: #{media_type}")) : builder end |