# File lib/rabbit/source/base.rb, line 88 def base=(new_value) if new_value.nil? init_base else set_base(new_value) end end
# File lib/rabbit/source/base.rb, line 61 def full_path(path) if @base_uri.nil? or @base_uri.relative? ::File.join(@base, path) else uri = @base_uri.dup uri.path = @base_uri.path + "/" unless /\/$/ =~ @base_uri.path (uri + path).to_s end end
# File lib/rabbit/source/base.rb, line 53 def modified? @force_modified or need_read? end
# File lib/rabbit/source/base.rb, line 57 def need_read? @source.nil? end
# File lib/rabbit/source/base.rb, line 77 def old?(current, get_latest_method_name) current.nil? or (current and __send__(get_latest_method_name) > current) end
# File lib/rabbit/source/base.rb, line 71 def open_full_path(path, mode="rb") open(full_path(path), mode) do |f| yield f end end
# File lib/rabbit/source/base.rb, line 35 def read if need_read? @source = _read if @encoding.nil? enc = guess_encoding(@source) else enc = @encoding end if /\Autf-?8\z/ =~ enc @source.force_encoding(enc) if @source.respond_to?(:force_encoding) else @source = convert_encoding("UTF-8", enc, @source) end end @source end
Generated with the Darkfish Rdoc Generator 2.