Class: Rake::LinkedList::EmptyLinkedList (Ruby 2.2.3)
Description: Class : Rake::LinkedList::EmptyLinkedList - Ruby 2.2.3

- Home
- Core 2.2.3
- Std-lib 2.2.3
- Downloads

Support for the Ruby 2.2 series has ended. See here for reference.

### Home Classes Methods

### In Files

- rake/linked_list.rb

### Parent

Rake::LinkedList

### Methods

- ::cons
- ::new
- #empty?

### Class/Module Index

Quicksearch

- FileUtils
- Module
- Object
- Pathname
- Rake::Application
- Rake::CompositePublisher
- Rake::DSL
- Rake::DefaultLoader
- Rake::EarlyTime
- Rake::FileCreationTask
- Rake::FileList
- Rake::FileTask
- Rake::FileUtilsExt
- Rake::InvocationChain
- Rake::InvocationChain::EmptyInvocationChain
- Rake::InvocationExceptionMixin
- Rake::LateTime
- Rake::LinkedList
- Rake::LinkedList::EmptyLinkedList
- Rake::MakefileLoader
- Rake::MultiTask
- Rake::NameSpace
- Rake::PackageTask
- Rake::PrivateReader
- Rake::RuleRecursionOverflowError
- Rake::Scope
- Rake::SshDirPublisher
- Rake::SshFilePublisher
- Rake::SshFreshDirPublisher
- Rake::Task
- Rake::TaskArgumentError
- Rake::TaskArguments
- Rake::TaskLib
- Rake::TaskManager
- Rake::TestTask
- Rake::Win32
- String

No matching classes.

# Rake::LinkedList::EmptyLinkedList

Represent an empty list, using the Null Object Pattern.

When inheriting from the LinkedList class, you should implement a type specific Empty class as well. Make sure you set the class instance variable @parent to the associated list class (this allows conj, cons and make to work polymorphically).

### Public Class Methods

cons(head, tail) click to toggle source

                   # File rake/linked_list.rb, line 95
    def self.cons(head, tail)
      @parent.cons(head, tail)
    end

new() click to toggle source

                   # File rake/linked_list.rb, line 88
    def initialize
    end

### Public Instance Methods

empty?() click to toggle source

                   # File rake/linked_list.rb, line 91
    def empty?
      true
    end