lib/druid/javascript_framework_facade.rb in druid-ts-1.1.8 vs lib/druid/javascript_framework_facade.rb in druid-ts-1.2.0

- old
+ new

@@ -1,8 +1,9 @@ require 'druid/javascript/jquery' require 'druid/javascript/prototype' require 'druid/javascript/yui' +require 'druid/javascript/angularjs' module Druid # # Provide hooks into different common Javascript Frameworks. # Currently this module only supports jQuery and Prototype but it @@ -16,12 +17,12 @@ class << self # # Set the framework to use # - # @param [Symbol] the framework to use. :jquery and :prototype - # are supported + # @param [Symbol] the framework to use. :jquery and :prototype, :yui, + # and :angularjs are supported # def framework=(framework) initialize_script_builder unless @builder raise unknown_framework(framework) unless @builder[framework] @framework = framework @@ -56,10 +57,11 @@ def initialize_script_builder @builder = { :jquery => Druid::Javascript::JQuery, :prototype => Druid::Javascript::Prototype, - :yui => Druid::Javascript::YUI + :yui => Druid::Javascript::YUI, + :angularjs => Druid::Javascript::AngularJS } end def unknown_framework(framework) "You specified the Javascript framework #{framework} and it is unknow to the system"