### Home Classes Methods

### In Files

- lib/rabbit/utils.rb

### Methods

- #arg_list
- #collect_classes_under_module
- #collect_modules_under_module
- #collect_under_module
- #combination
- #compute_bottom_y
- #compute_left_x
- #compute_right_x
- #compute_top_y
- #corresponding_class_under_module
- #corresponding_module_under_module
- #corresponding_objects
- #drawable_to_pixbuf
- #ensure_time
- #events_pending_available?
- #extract_four_way
- #find_path_in_load_path
- #init_by_constants_as_default_value
- #move_to
- #move_to_bottom_left
- #move_to_bottom_right
- #move_to_top_left
- #move_to_top_right
- #parse_four_way
- #process_pending_events
- #process_pending_events_proc
- #quartz?
- #require_files_under_directory_in_load_path
- #require_safe
- #split_number_to_minute_and_second
- #stringify_hash_key
- #support_console_input?
- #support_console_output?
- #syntax_highlighting_debug?
- #time
- #to_class_name
- #unescape_title
- #windows?

### Class/Module Index

Quicksearch

- Rabbit
- Rabbit::AAFigureCanNotHandleError
- Rabbit::Action
- Rabbit::ApplyFinish
- Rabbit::AuthorConfiguration
- Rabbit::BlockDiagCanNotHandleError
- Rabbit::CantAllocateColorError
- Rabbit::CantFindHTMLTemplate
- Rabbit::CantFindThemeRDTemplate
- Rabbit::Canvas
- Rabbit::Command
- Rabbit::Command::Rabbit
- Rabbit::Command::RabbitSlide
- Rabbit::Command::RabbitTheme
- Rabbit::Config
- Rabbit::Console
- Rabbit::Converter
- Rabbit::CursorManager
- Rabbit::DependencyCanvas
- Rabbit::DiaCanNotHandleError
- Rabbit::DirtyCount
- Rabbit::EPSCanNotHandleError
- Rabbit::Element
- Rabbit::Element::Author
- Rabbit::Element::Base
- Rabbit::Element::Base::DrawHook
- Rabbit::Element::BlockElement
- Rabbit::Element::BlockHorizontalCentering
- Rabbit::Element::BlockQuote
- Rabbit::Element::Body
- Rabbit::Element::ClassName
- Rabbit::Element::Code
- Rabbit::Element::Comment
- Rabbit::Element::Container
- Rabbit::Element::ContainerElement
- Rabbit::Element::ContentSource
- Rabbit::Element::CustomTag
- Rabbit::Element::Date
- Rabbit::Element::DeletedText
- Rabbit::Element::DescriptionContent
- Rabbit::Element::DescriptionList
- Rabbit::Element::DescriptionListItem
- Rabbit::Element::DescriptionTerm
- Rabbit::Element::Emphasis
- Rabbit::Element::EnumList
- Rabbit::Element::EnumListItem
- Rabbit::Element::FootText
- Rabbit::Element::FootTextBlock
- Rabbit::Element::Footnote
- Rabbit::Element::HeadLine
- Rabbit::Element::Image
- Rabbit::Element::ImageTitleSlide
- Rabbit::Element::Index
- Rabbit::Element::IndexSlide
- Rabbit::Element::IndexThumbnail
- Rabbit::Element::IndexThumbnailRow
- Rabbit::Element::Institution
- Rabbit::Element::ItemList
- Rabbit::Element::ItemListItem
- Rabbit::Element::Keyboard
- Rabbit::Element::Keyword
- Rabbit::Element::MethodDescription
- Rabbit::Element::MethodKind
- Rabbit::Element::MethodList
- Rabbit::Element::MethodListItem
- Rabbit::Element::MethodName
- Rabbit::Element::MethodTerm
- Rabbit::Element::Note
- Rabbit::Element::Paragraph
- Rabbit::Element::Place
- Rabbit::Element::PopplerPage
- Rabbit::Element::PopplerSlide
- Rabbit::Element::PopplerTitleSlide
- Rabbit::Element::PreformattedBlock
- Rabbit::Element::PreformattedText
- Rabbit::Element::ReferText
- Rabbit::Element::Slide
- Rabbit::Element::SlideElement
- Rabbit::Element::Subscript
- Rabbit::Element::Subtitle
- Rabbit::Element::Superscript
- Rabbit::Element::SyntaxHighlightingBlock
- Rabbit::Element::SyntaxHighlightingText
- Rabbit::Element::Table
- Rabbit::Element::TableBody
- Rabbit::Element::TableCell
- Rabbit::Element::TableHead
- Rabbit::Element::TableHeader
- Rabbit::Element::TableRow
- Rabbit::Element::Text
- Rabbit::Element::TextBlock
- Rabbit::Element::TextBlockElement
- Rabbit::Element::TextContainer
- Rabbit::Element::TextContainerElement
- Rabbit::Element::TextElement
- Rabbit::Element::TextRenderer
- Rabbit::Element::Title
- Rabbit::Element::TitleSlide
- Rabbit::Element::Variable
- Rabbit::Element::Verbatim
- Rabbit::Element::Video
- Rabbit::Element::WaitBlock
- Rabbit::Element::WaitTag
- Rabbit::Element::When
- Rabbit::Element::Where
- Rabbit::EmbedFrame
- Rabbit::Error
- Rabbit::Format
- Rabbit::Format::ConvenienceTextFormatter
- Rabbit::Format::Foreground
- Rabbit::Format::Formatter
- Rabbit::Format::Size
- Rabbit::Format::SpanTextFormatter
- Rabbit::Format::ValueContainerFormatter
- Rabbit::Frame
- Rabbit::Front
- Rabbit::Front::PublicLevel
- Rabbit::GIMPCanNotHandleError
- Rabbit::GemBuilder
- Rabbit::GemFinder
- Rabbit::Gesture
- Rabbit::Gesture::Handler
- Rabbit::Gesture::Processor
- Rabbit::GetText
- Rabbit::Graffiti
- Rabbit::Graffiti::ConfigDialog
- Rabbit::Graffiti::Processor
- Rabbit::HTML
- Rabbit::HTML::Generator
- Rabbit::ImageFileDoesNotExistError
- Rabbit::ImageLoadError
- Rabbit::ImageLoadWithExternalCommandError
- Rabbit::ImageLoader
- Rabbit::ImageManipulable
- Rabbit::ImageManipulable::Base
- Rabbit::ImageManipulable::Default
- Rabbit::ImageManipulable::Dia
- Rabbit::ImageManipulable::EPS
- Rabbit::ImageManipulable::GIMP
- Rabbit::ImageManipulable::PDF
- Rabbit::ImageManipulable::SVG
- Rabbit::ImmutableSourceTypeError
- Rabbit::InfoWindow
- Rabbit::InvalidImageSizeError
- Rabbit::InvalidMotionError
- Rabbit::Keys
- Rabbit::Keys::Alt
- Rabbit::Keys::Control
- Rabbit::Keys::Shift
- Rabbit::Logger
- Rabbit::Logger::Base
- Rabbit::Logger::GUI
- Rabbit::Logger::STDERR
- Rabbit::Logger::Severity
- Rabbit::Menu
- Rabbit::ModuleLoader
- Rabbit::NoPrintSupportError
- Rabbit::NotAvailableInterfaceError
- Rabbit::NotExistError
- Rabbit::NotFileError
- Rabbit::NotReadableError
- Rabbit::NullFrame
- Rabbit::ParseError
- Rabbit::ParseFinish
- Rabbit::Parser
- Rabbit::Parser::Base
- Rabbit::Parser::Ext
- Rabbit::Parser::Ext::AAFigure
- Rabbit::Parser::Ext::BlockDiag
- Rabbit::Parser::Ext::CodeRay
- Rabbit::Parser::Ext::CodeRay::RabbitEncoder
- Rabbit::Parser::Ext::Emacs
- Rabbit::Parser::Ext::Enscript
- Rabbit::Parser::Ext::Entity
- Rabbit::Parser::Ext::Escape
- Rabbit::Parser::Ext::Image
- Rabbit::Parser::Ext::Image::Private
- Rabbit::Parser::Ext::Inline
- Rabbit::Parser::Ext::TeX
- Rabbit::Parser::Ext::Video
- Rabbit::Parser::Image
- Rabbit::Parser::Markdown
- Rabbit::Parser::Markdown::Converter
- Rabbit::Parser::NoteSetter
- Rabbit::Parser::PDF
- Rabbit::Parser::PauseSupport
- Rabbit::Parser::RD
- Rabbit::Parser::RD::Ext
- Rabbit::Parser::RD::Ext::Base
- Rabbit::Parser::RD::Ext::BlockVerbatim
- Rabbit::Parser::RD::Ext::CharacterReference
- Rabbit::Parser::RD::Ext::Image
- Rabbit::Parser::RD::Ext::InlineVerbatim
- Rabbit::Parser::RD::Ext::Refer
- Rabbit::Parser::RD::Ext::Video
- Rabbit::Parser::RD::RD2RabbitVisitor
- Rabbit::Parser::RD::Visitor
- Rabbit::Parser::SlidePropertySetter
- Rabbit::Parser::Wiki
- Rabbit::Parser::Wiki::RabbitOutput
- Rabbit::Parser::Wiki::RabbitOutput::BlockPlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin
- Rabbit::Parser::Wiki::RabbitOutput::InlinePlugin::Private
- Rabbit::PathManipulatable
- Rabbit::Progress
- Rabbit::READMEParser
- Rabbit::RT2RabbitVisitor
- Rabbit::Renderer
- Rabbit::Renderer::Base
- Rabbit::Renderer::Color
- Rabbit::Renderer::Display
- Rabbit::Renderer::Display::Base
- Rabbit::Renderer::Display::ButtonHandler
- Rabbit::Renderer::Display::ClutterEmbed
- Rabbit::Renderer::Display::Cursor
- Rabbit::Renderer::Display::DrawingArea
- Rabbit::Renderer::Display::DrawingAreaBase
- Rabbit::Renderer::Display::DrawingAreaPrimitive
- Rabbit::Renderer::Display::DrawingAreaViewOnly
- Rabbit::Renderer::Display::GL
- Rabbit::Renderer::Display::Gesture
- Rabbit::Renderer::Display::Graffiti
- Rabbit::Renderer::Display::HookHandler
- Rabbit::Renderer::Display::Info
- Rabbit::Renderer::Display::KeyHandler
- Rabbit::Renderer::Display::Magnifier
- Rabbit::Renderer::Display::Mask
- Rabbit::Renderer::Display::Menu
- Rabbit::Renderer::Display::Progress
- Rabbit::Renderer::Display::ScrollHandler
- Rabbit::Renderer::Display::Search
- Rabbit::Renderer::Display::Spotlight
- Rabbit::Renderer::Engine
- Rabbit::Renderer::Engine::Cairo
- Rabbit::Renderer::Engine::GDK
- Rabbit::Renderer::GL
- Rabbit::Renderer::Kernel
- Rabbit::Renderer::Pixmap
- Rabbit::Renderer::Pixmap::Base
- Rabbit::Renderer::Pixmap::Cairo
- Rabbit::Renderer::Pixmap::GDK
- Rabbit::Renderer::Pixmap::GL
- Rabbit::Renderer::Print
- Rabbit::Renderer::Print::Base
- Rabbit::Renderer::Print::Cairo
- Rabbit::Renderer::Print::Layout2
- Rabbit::Renderer::Print::LayoutBase
- Rabbit::Renderer::Print::LayoutMore
- Rabbit::Renderer::Print::Multiple
- Rabbit::SOAP
- Rabbit::SOAP::Driver
- Rabbit::SOAP::Server
- Rabbit::ScreenInfo
- Rabbit::SearchWindow
- Rabbit::Searcher
- Rabbit::SlideConfiguration
- Rabbit::Source
- Rabbit::Source::ARGF
- Rabbit::Source::Base
- Rabbit::Source::File
- Rabbit::Source::Hiki
- Rabbit::Source::LimitAccessInterval
- Rabbit::Source::Memory
- Rabbit::Source::SlideShare
- Rabbit::Source::URI
- Rabbit::SourceGenerator
- Rabbit::SourceGenerator::Hiki
- Rabbit::SourceGenerator::Markdown
- Rabbit::SourceGenerator::RD
- Rabbit::SourceUnreadableError
- Rabbit::Stock
- Rabbit::SystemRunner
- Rabbit::Task
- Rabbit::Task::Slide
- Rabbit::Task::SlideShare
- Rabbit::Task::SlideShare::Error
- Rabbit::Task::Theme
- Rabbit::TeXCanNotHandleError
- Rabbit::TemporaryFile
- Rabbit::Theme
- Rabbit::Theme::Applier
- Rabbit::Theme::DirectoryEntry
- Rabbit::Theme::ElementContainer
- Rabbit::Theme::Entry
- Rabbit::Theme::FileEntry
- Rabbit::Theme::GemEntry
- Rabbit::Theme::ImageDirectoryEntry
- Rabbit::Theme::ImageFileEntry
- Rabbit::Theme::ImageGemEntry
- Rabbit::Theme::Manager
- Rabbit::Theme::Searcher
- Rabbit::ThemeConfiguration
- Rabbit::ThemeExit
- Rabbit::TrackBall
- Rabbit::TrackBall::Vector
- Rabbit::UnknownCursorTypeError
- Rabbit::UnknownPropertyError
- Rabbit::UnsupportedFormatError
- Rabbit::Utils
- Rabbit::VideoWindow
- Rabbit::VideoWindow::VideoWidget
- Rabbit::XMLRPC
- Rabbit::XMLRPC::Client
- Rabbit::XMLRPC::Server
- Rabbit::XMLRPC::Servlet
- OptionParser
- OptionParser::Category
- OptionParser::List
- OptionParser::Switch
- Cairo
- Cairo::Context
- Gtk
- Gtk::Action
- Pango
- Pango::Context
- Object

No matching classes.

# Rabbit::Utils

### Public Instance Methods

arg_list(arity) click to toggle source

    # File lib/rabbit/utils.rb, line 82
    def arg_list(arity)
      args = []
      if arity == -1
        args << "*args"
      else
        arity.times do |i|
          args << "arg#{i}"
        end
      end
      args
    end

collect_classes_under_module(mod) click to toggle source

    # File lib/rabbit/utils.rb, line 58
    def collect_classes_under_module(mod)
      collect_under_module(mod, Class)
    end

collect_modules_under_module(mod) click to toggle source

    # File lib/rabbit/utils.rb, line 62
    def collect_modules_under_module(mod)
      collect_under_module(mod, Module)
    end

collect_under_module(mod, klass) click to toggle source

    # File lib/rabbit/utils.rb, line 50
    def collect_under_module(mod, klass)
      mod.constants.collect do |x|
        mod.const_get(x)
      end.find_all do |x|
        x.is_a?(klass)
      end
    end

combination(elements) click to toggle source

    # File lib/rabbit/utils.rb, line 243
    def combination(elements)
      return [] if elements.empty?
      first, *rest = elements
      results = combination(rest)
      if results.empty?
        [[], [first]]
      else
        results + results.collect {|result| [first, *result]}
      end
    end

compute_bottom_y(base_y, base_height, target_height, max_y) click to toggle source

    # File lib/rabbit/utils.rb, line 213
    def compute_bottom_y(base_y, base_height, target_height, max_y)
      bottom = base_y + base_height - target_height
      [[bottom, max_y - target_height].min, 0].max
    end

compute_left_x(base_x) click to toggle source

    # File lib/rabbit/utils.rb, line 200
    def compute_left_x(base_x)
      [base_x, 0].max
    end

compute_right_x(base_x, base_width, target_width, max_x) click to toggle source

    # File lib/rabbit/utils.rb, line 204
    def compute_right_x(base_x, base_width, target_width, max_x)
      right = base_x + base_width - target_width
      [[right, max_x - target_width].min, 0].max
    end

compute_top_y(base_y) click to toggle source

    # File lib/rabbit/utils.rb, line 209
    def compute_top_y(base_y)
      [base_y, 0].max
    end

corresponding_class_under_module(mod) click to toggle source

    # File lib/rabbit/utils.rb, line 74
    def corresponding_class_under_module(mod)
      corresponding_objects(collect_classes_under_module(mod))
    end

corresponding_module_under_module(mod) click to toggle source

    # File lib/rabbit/utils.rb, line 78
    def corresponding_module_under_module(mod)
      corresponding_objects(collect_modules_under_module(mod))
    end

corresponding_objects(objects) click to toggle source

    # File lib/rabbit/utils.rb, line 66
    def corresponding_objects(objects)
      objects.find_all do |object|
        object.respond_to?(:priority)
      end.sort_by do |object|
        object.priority
      end.last
    end

drawable_to_pixbuf(drawable) click to toggle source

    # File lib/rabbit/utils.rb, line 109
    def drawable_to_pixbuf(drawable)
      args = [drawable.colormap, drawable, 0, 0, *drawable.size]
      Gdk::Pixbuf.from_drawable(*args)
    end

ensure_time(object) click to toggle source

    # File lib/rabbit/utils.rb, line 285
    def ensure_time(object)
      return nil if object.nil?
      return object if object.is_a?(Numeric)

      if /\A\s*\z/ =~ object
        nil
      else
        if /\A\s*(\d*\.?\d*)\s*(h|m|s)?\s*\z/ =~ object
          time = $1.to_f
          unit = $2
          if unit
            case unit.downcase
            when "m"
              time *= 60
            when "h"
              time *= 3600
            end
          end
          time.to_i
        else
          nil
        end
      end
    end

events_pending_available?() click to toggle source

    # File lib/rabbit/utils.rb, line 122
    def events_pending_available?
      !windows? #or (Gtk::BINDING_VERSION <=> [0, 14, 1]) > 0
    end

extract_four_way(params) click to toggle source

    # File lib/rabbit/utils.rb, line 254
    def extract_four_way(params)
      [params[:top], params[:right], params[:bottom], params[:left]]
    end

find_path_in_load_path(*name) click to toggle source

    # File lib/rabbit/utils.rb, line 94
    def find_path_in_load_path(*name)
      found_path = $LOAD_PATH.find do |path|
        File.readable?(File.join(path, *name))
      end
      if found_path
        File.join(found_path, *name)
      else
        nil
      end
    end

init_by_constants_as_default_value(obj) click to toggle source

    # File lib/rabbit/utils.rb, line 132
    def init_by_constants_as_default_value(obj)
      klass = obj.class
      klass.constants.each do |name|
        const = klass.const_get(name)
        unless const.kind_of?(Class)
          var_name = name.downcase
          obj.instance_variable_set("@#{var_name}", const.dup)
          klass.module_eval {attr_accessor var_name}
        end
      end
    end

move_to(base, target) click to toggle source

    # File lib/rabbit/utils.rb, line 183
    def move_to(base, target)
      window = base.window
      screen = window.screen
      num = screen.get_monitor(window)
      monitor = screen.monitor_geometry(num)
      window_x, window_y = window.origin
      window_width, window_height = window.size
      target_width, target_height = target.size_request

      args = [window_x, window_y, window_width, window_height]
      args.concat([target_width, target_height])
      args.concat([screen.width, screen.height])
      x, y = yield(*args)

      target.move(x, y)
    end

move_to_bottom_left(base, target) click to toggle source

    # File lib/rabbit/utils.rb, line 230
    def move_to_bottom_left(base, target)
      move_to(base, target) do |bx, by, bw, bh, tw, th, sw, sh|
        [compute_left_x(bx), compute_bottom_y(by, bh, th, sh)]
      end
    end

move_to_bottom_right(base, target) click to toggle source

    # File lib/rabbit/utils.rb, line 236
    def move_to_bottom_right(base, target)
      move_to(base, target) do |bx, by, bw, bh, tw, th, sw, sh|
        [compute_right_x(bx, bw, tw, sw),
         compute_bottom_y(by, bh, th, sh)]
      end
    end

move_to_top_left(base, target) click to toggle source

    # File lib/rabbit/utils.rb, line 218
    def move_to_top_left(base, target)
      move_to(base, target) do |bx, by, bw, bh, tw, th, sw, sh|
        [compute_left_x(bx), compute_top_y(by)]
      end
    end

move_to_top_right(base, target) click to toggle source

    # File lib/rabbit/utils.rb, line 224
    def move_to_top_right(base, target)
      move_to(base, target) do |bx, by, bw, bh, tw, th, sw, sh|
        [compute_right_x(bx, bw, tw, sw), compute_top_y(by)]
      end
    end

parse_four_way(*values) click to toggle source

    # File lib/rabbit/utils.rb, line 258
    def parse_four_way(*values)
      if values.size == 1 and
          (values.first.is_a?(Array) or values.first.is_a?(Hash))
        values = values.first
      end
      if values.is_a?(Hash)
        extract_four_way(values)
      else
        case values.size
        when 1
          left = right = top = bottom = Integer(values.first)
        when 2
          top, left = values.collect {|x| Integer(x)}
          bottom = top
          right = left
        when 3
          top, left, bottom = values.collect {|x| Integer(x)}
          right = left
        when 4
          top, right, bottom, left = values.collect {|x| Integer(x)}
        else
          raise ArgumentError
        end
        [top, right, bottom, left]
      end
    end

process_pending_events() click to toggle source

    # File lib/rabbit/utils.rb, line 114
    def process_pending_events
      if events_pending_available?
        while Gtk.events_pending?
          Gtk.main_iteration
        end
      end
    end

process_pending_events_proc() click to toggle source

    # File lib/rabbit/utils.rb, line 126
    def process_pending_events_proc
      Proc.new do
        process_pending_events
      end
    end

quartz?() click to toggle source

    # File lib/rabbit/utils.rb, line 175
    def quartz?
      if Gdk.respond_to?(:windowing_quartz?)
        Gdk.windowing_quartz?
      else
        !windows? and !Gdk.windowing_x11?
      end
    end

require_files_under_directory_in_load_path(dir, silent=true) click to toggle source

    # File lib/rabbit/utils.rb, line 20
    def require_files_under_directory_in_load_path(dir, silent=true)
      normalize = Proc.new do |base_path, path|
        path.sub(/\A#{Regexp.escape(base_path)}\/?/, '').sub(/\.[^.]+$/, '')
      end

      $LOAD_PATH.each do |path|
        source_glob = ::File.join(path, dir, '*')
        Dir.glob(source_glob) do |source|
          next if File.directory?(source)
          begin
            before = Time.now
            normalized_path = normalize[path, source]
            require_safe normalized_path
            unless silent
              STDERR.puts([Time.now - before, normalized_path].inspect)
            end
          rescue LoadError, RuntimeError # Should be changed to Gtk::InitError?
            if $!.is_a?(RuntimeError)
              raise if /\ACannot open display:\s*\d*\z/ !~ $!.message
            end
            unless silent
              STDERR.puts(path)
              STDERR.puts($!.message)
              STDERR.puts($@)
            end
          end
        end
      end
    end

require_safe(path) click to toggle source

    # File lib/rabbit/utils.rb, line 13
    def require_safe(path)
      require path
    rescue LoadError
      $".reject! {|x| /\A#{Regexp.escape(path)}/ =~ x}
      raise
    end

split_number_to_minute_and_second(number) click to toggle source

    # File lib/rabbit/utils.rb, line 310
    def split_number_to_minute_and_second(number)
      if number >= 0
        sign = " "
      else
        sign = "-"
      end
      [sign, *number.abs.divmod(60)]
    end

stringify_hash_key(hash) click to toggle source

    # File lib/rabbit/utils.rb, line 328
    def stringify_hash_key(hash)
      stringified_hash = {}
      hash.each do |key, value|
        stringified_hash[key.to_s] = value
      end
      stringified_hash
    end

support_console_input?() click to toggle source

    # File lib/rabbit/utils.rb, line 149
    def support_console_input?
      if windows?
        begin
          File.open("conin$", "w") {}
          true
        rescue SystemCallError
          false
        end
      else
        $stdin.tty? or ENV["TERM"]
      end
    end

support_console_output?() click to toggle source

    # File lib/rabbit/utils.rb, line 162
    def support_console_output?
      if windows?
        begin
          File.open("conout$", "w") {}
          true
        rescue SystemCallError
          false
        end
      else
        $stdout.tty? or ENV["TERM"]
      end
    end

syntax_highlighting_debug?() click to toggle source

    # File lib/rabbit/utils.rb, line 336
    def syntax_highlighting_debug?
      ENV["RABBIT_SYNTAX_HIGHLIGHTING_DEBUG"] == "yes"
    end

time(message=nil) click to toggle source

    # File lib/rabbit/utils.rb, line 319
    def time(message=nil)
      before = Time.now
      yield
    ensure
      output = Time.now - before
      output = [message, output] if message
      p output
    end

to_class_name(name) click to toggle source

    # File lib/rabbit/utils.rb, line 7
    def to_class_name(name)
      name.gsub(/(?:\A|_|\-)([a-z])/) do |x|
        $1.upcase
      end
    end

unescape_title(title) click to toggle source

    # File lib/rabbit/utils.rb, line 105
    def unescape_title(title)
      REXML::Text.unnormalize(title).gsub(/\r|\n/, ' ')
    end

windows?() click to toggle source

    # File lib/rabbit/utils.rb, line 144
    def windows?
      # Gdk.windowing_win32? # what about this?
      /cygwin|mingw|mswin32|bccwin32/.match(RUBY_PLATFORM) ? true : false
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.