:nodoc:
 @api private
510132
def compute_valign(layout, valign, embed_h)
      return 0 unless layout.height > 0
      ink_extents = layout.extents[1]
      ink_extents.height = embed_h * Pango::SCALE if ink_extents.height == 0 # JUST embed, bug #134
      case valign.to_s.downcase
      when 'middle'
        Pango.pixels((layout.height - ink_extents.height) / 2)
      when 'bottom'
        Pango.pixels(layout.height - ink_extents.height)
      else
        0
      end
    end
132555
def association(name) #:nodoc:
      association = association_instance_get(name)

      if association.nil?
        reflection  = self.class.reflect_on_association(name)
        association = reflection.association_class.new(self, reflection)
        association_instance_set(name, association)
      end

      association
    end
1098543
def client # :nodoc:
      if @client
        return @client
      else
        @client = Net::HTTP.new(@host, Etsy.protocol == "http" ? 80 : 443)
        @client.use_ssl = true if Etsy.protocol == "https"
        return @client
      end
    end
1262812
def request_setup req_or_uri # :nodoc:
    req = if URI === req_or_uri then
            Net::HTTP::Get.new req_or_uri.request_uri
          else
            req_or_uri
          end

    @headers.each do |pair|
      req.add_field(*pair)
    end

    @override_headers.each do |name, value|
      req[name] = value
    end

    unless req['Connection'] then
      req.add_field 'Connection', 'keep-alive'
      req.add_field 'Keep-Alive', @keep_alive
    end

    req
  end
77668
def with_options(opts = {}) # :nodoc:
      opts = opts.dup
      opts.delete(:comment)
      @opt_stack.push( @opt_stack.last.merge(opts))
      yield self
      @opt_stack.pop
    end
33869
def orb(self):
        '''

        '''
        with self._mutex:
            if self._parent.name == '/':
                return None
            return self._parent.orb
1057807
def bind(proc=nil, &block)
      (proc || block).call(value).tap do |result|

        # def parent_name(obj)
        #   parts = obj.class.name.split('::')
        #   if parts.count > 1
        #     parts[0..-2].join('::')
        #   else
        #     parts[0]
        #   end
        # end

        # self_parent  = parent_name(self)
        # other_parent = parent_name(result)
        # raise NotMonadError, "Expected #{result.inspect} to be an #{other_parent}" unless self_parent == other_parent

        parent = self.class.superclass === Object ? self.class : self.class.superclass
        raise NotMonadError, "Expected #{result.inspect} to be an #{parent}" unless result.is_a? parent
      end
    end
643577
def pop
      raise Erlang::ImproperListError if improper?
      return self if empty?
      new_size = size - 1
      return Erlang::List.new(head, tail.take(new_size - 1)) if new_size >= 1
      return Erlang::Nil
    end
975232
void init( DMatrixSparseCSC A ) {
        this.A = A;
        this.m = A.numRows;
        this.n = A.numCols;

        this.next = 0;
        this.head = m;
        this.tail = m + n;
        this.nque = m + 2*n;

        if( parent.length < n || leftmost.length < m) {
            parent = new int[n];
            post = new int[n];
            pinv = new int[m+n];
            countsR = new int[n];
            leftmost = new int[m];
        }
        gwork.reshape(m+3*n);
    }
1046914
def call(env)
      status       = env["PATH_INFO"][1..-1]
      request      = ActionDispatch::Request.new(env)
      content_type = request.formats.first
      body         = {  status: status,
                        error: Rack::Utils::HTTP_STATUS_CODES.fetch(status.to_i, Rack::Utils::HTTP_STATUS_CODES[500]) }

      Errdo::Exception.new(env) if Errdo.log404 || status.to_i != 404
      render(status, content_type, body)
    end
932879
def ref(x, y, rw, rh) #:nodoc:
      translate(x, y) if x != 0 || y != 0
      @width = rw if rw
      @height = rh if rh
    end
706772
def root(current, indent)
      if KEYWORDS.include? current[@type]
        send :"#{current[@type]}_node", current, indent
      else
        send current[@type], current, indent
      end
    end
372177
def <<(node)
      @nodes << node
      @index_names.each { |name| add_to_index(name, value(node, name), node) }
      @contexts.each { |context| eval_context(context, node) }
      self
    end
592797
def symbolize(allowed_keys: nil, allowed_vals: nil)
      keys = allowed_keys || self.class.allowed[:keys]
      vals = allowed_vals || self.class.allowed[:vals]

      each_with_object({}) do |(k, v), h|
        k = k.to_sym unless !k.respond_to?(:to_sym) || keys.include?(k.class)
        v = v.to_sym unless !v.respond_to?(:to_sym) || vals.include?(v.class)

        h[k] = !v.respond_to?(:symbolize) ? v : v.symbolize({
          :allowed_keys => allowed_keys,
          :allowed_vals => allowed_vals
        })
      end
    end
1169147
def at(index)
      raise Erlang::ImproperListError if improper?
      index += size if index < 0
      return nil if index < 0
      node = self
      while index > 0
        node = node.tail
        index -= 1
      end
      return node.head
    end
195183
def show(objectish=nil, path=nil)
      arr_opts = []

      arr_opts << (path ? "#{objectish}:#{path}" : objectish)

      command('show', arr_opts.compact)
    end
1204963
def index
      raise CanCan::AccessDenied.new unless current_user
      @scratches = ImageScratch.where(ownable: current_user).all
      (authorize! :read, @scratches[0]) unless @scratches.empty?
    end