Top Level Namespace

Extended by:
ActiveSupport::CoreExtensions::Base64::Encoding
Includes:
Java

Defined Under Namespace

Modules: ActionController, ActionMailer, ActionPack, ActionView, ActiveModel, ActiveRecord, ActiveResource, ActiveSupport, Builder, CharDet, ClassInheritableAttributes, Continuum, Enumerable, GetText, HTML, I18n, Kernel, LibXML, MailHelper, Mime, MysqlCompat, Net, Process, REXML, RackLintPatch, TMail, TZInfo, Test, Text, YAML Classes: Array, Benchmark, BigDecimal, BlankSlate, CGI, Class, Date, DateTime, ERB, Exception, FalseClass, File, Fixnum, Fixture, FixtureClassNotFound, Fixtures, Float, Hash, HashWithIndifferentAccess, Integer, KeyError, Logger, MemCache, MissingSourceFile, Module, NameError, NilClass, Numeric, Object, Pathname, Proc, Range, Regexp, String, StringInput, StringOutput, Symbol, TestText__Format, Time, TrueClass

Instance Method Summary (collapse)

Methods included from ActiveSupport::CoreExtensions::Base64::Encoding

encode64s

Instance Method Details

- (Object) require_arch(fname)

Attempts to require anative extension. Falls back to pure-ruby version, if it fails.

This uses Config::CONFIG from rbconfig.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb', line 9

def require_arch(fname)
  arch = Config::CONFIG['arch']
  begin
    path = File.join("tmail", arch, fname)
    require path
  rescue LoadError => e
    # try pre-built Windows binaries
    if arch =~ /mswin/
      require File.join("tmail", 'mswin32', fname)
    else
      raise e
    end
  end
end