#NEWLINE# def provision( self ) : #NEWLINE# #INDENT# "\n        Installs `Ruby <http://www.ruby-lang.org/>`_ and its dependencies.\n        This method should be called upon if overriden in base classes, or Ruby won't work properly in the remote server.\n\n        Example:\n        ::\n\n            from provy.core import Role\n            from provy.more.debian import RubyRole\n\n            class MySampleRole(Role):\n                def provision(self):\n                    self.provision_role(RubyRole) # no need to call this if using with block.\n        " #NEWLINE# with self . using ( AptitudeRole ) as aptitude : #NEWLINE# #INDENT# aptitude . ensure_up_to_date ( ) #NEWLINE# aptitude . ensure_package_installed ( 'ruby{version}-full' . format ( version = self . version ) ) #NEWLINE# update_alternatives_command = UPDATE_ALTERNATIVES_COMMAND . format ( version = update_alternatives_command . version , priority = self . priority ) #NEWLINE# self . execute ( update_alternatives_command , sudo = True )