Module: Avataree

Defined in:
lib/avataree/image.rb,
lib/avataree.rb,
lib/avataree/switch.rb,
lib/avataree/helper.rb,
lib/avataree/profile.rb,
lib/avataree/railtie.rb

Overview

Copyright (c) 2010 [Bagwan Pankaj]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Defined Under Namespace

Modules: Helper, ImageServices, ProfileServices Classes: Railtie

Class Method Summary collapse

Class Method Details

.enable!Object



26
27
28
29
# File 'lib/avataree/switch.rb', line 26

def enable!
  enable_for_controller!
  enable_for_views!
end

.enable_for_controller!Object



31
32
33
34
35
# File 'lib/avataree/switch.rb', line 31

def enable_for_controller!
  #hook for ActionController
  ActionController::Base.send(:include, Avataree::ImageServices)
  ActionController::Base.send(:include, Avataree::ProfileServices)
end

.enable_for_views!Object



37
38
39
40
# File 'lib/avataree/switch.rb', line 37

def enable_for_views!
  #hook for ActionView
  ActionView::Base.send(:include, Avataree::ImageServices)
end

.versionObject

gem version



35
36
37
# File 'lib/avataree.rb', line 35

def self.version #:nodoc
  "v" + File.read(File.join(File.dirname(__FILE__), '..', 'VERSION'))
end