$63 GRAYBYTE WORDPRESS FILE MANAGER $11

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 104.21.43.35 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby19/lib64/ruby/1.9.1/rss/

HOME
Current File : /opt/alt/ruby19/lib64/ruby/1.9.1/rss//utils.rb
module RSS
  module Utils
    module_function

    # Convert a name_with_underscores to CamelCase.
    def to_class_name(name)
      name.split(/[_\-]/).collect do |part|
        "#{part[0, 1].upcase}#{part[1..-1]}"
      end.join("")
    end

    def get_file_and_line_from_caller(i=0)
      file, line, = caller[i].split(':')
      line = line.to_i
      line += 1 if i.zero?
      [file, line]
    end

    # escape '&', '"', '<' and '>' for use in HTML.
    def html_escape(s)
      s.to_s.gsub(/&/, "&amp;").gsub(/\"/, "&quot;").gsub(/>/, "&gt;").gsub(/</, "&lt;")
    end
    alias h html_escape

    # If +value+ is an instance of class +klass+, return it, else
    # create a new instance of +klass+ with value +value+.
    def new_with_value_if_need(klass, value)
      if value.is_a?(klass)
        value
      else
        klass.new(value)
      end
    end

    def element_initialize_arguments?(args)
      [true, false].include?(args[0]) and args[1].is_a?(Hash)
    end

    module YesCleanOther
      module_function
      def parse(value)
        if [true, false, nil].include?(value)
          value
        else
          case value.to_s
          when /\Ayes\z/i
            true
          when /\Aclean\z/i
            false
          else
            nil
          end
        end
      end
    end

    module YesOther
      module_function
      def parse(value)
        if [true, false].include?(value)
          value
        else
          /\Ayes\z/i.match(value.to_s) ? true : false
        end
      end
    end

    module CSV
      module_function
      def parse(value, &block)
        if value.is_a?(String)
          value = value.strip.split(/\s*,\s*/)
          value = value.collect(&block) if block_given?
          value
        else
          value
        end
      end
    end

    module InheritedReader
      def inherited_reader(constant_name)
        base_class = inherited_base
        result = base_class.const_get(constant_name)
        found_base_class = false
        ancestors.reverse_each do |klass|
          if found_base_class
            if klass.const_defined?(constant_name)
              result = yield(result, klass.const_get(constant_name))
            end
          else
            found_base_class = klass == base_class
          end
        end
        result
      end

      def inherited_array_reader(constant_name)
        inherited_reader(constant_name) do |result, current|
          current + result
        end
      end

      def inherited_hash_reader(constant_name)
        inherited_reader(constant_name) do |result, current|
          result.merge(current)
        end
      end
    end
  end
end


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.50 PM
root / root
0755
content
--
3 Mar 2024 10.48 PM
root / linksafe
0755
dublincore
--
3 Mar 2024 10.48 PM
root / linksafe
0755
maker
--
3 Mar 2024 10.48 PM
root / linksafe
0755
0.9.rb
9.363 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
1.0.rb
8.461 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
2.0.rb
2.289 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
atom.rb
18.951 KB
12 May 2011 8.17 PM
root / linksafe
0644
content.rb
0.753 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
converter.rb
3.867 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
dublincore.rb
4.18 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
image.rb
4.574 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
itunes.rb
9.955 KB
16 Nov 2007 1.30 AM
root / linksafe
0644
maker.rb
1.12 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
parser.rb
15.473 KB
6 Apr 2010 12.22 AM
root / linksafe
0644
rexmlparser.rb
1.095 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
rss.rb
33.541 KB
19 May 2011 12.07 AM
root / linksafe
0644
slash.rb
1.216 KB
16 Nov 2007 1.30 AM
root / linksafe
0644
syndication.rb
1.75 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
taxonomy.rb
2.979 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
trackback.rb
6.556 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
utils.rb
2.612 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
xml-stylesheet.rb
2.128 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
xml.rb
1.468 KB
16 Nov 2007 1.30 AM
root / linksafe
0644
xmlparser.rb
1.549 KB
2 Oct 2009 10.45 AM
root / linksafe
0644
xmlscanner.rb
2.104 KB
2 Oct 2009 10.45 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF