### Home Classes Methods

### In Files

- lib/termtter/event.rb

### Parent

Object

### Methods

- ::new
- #==
- #===
- #[]
- #[]=
- #eql?
- #has_key?
- #hash
- #method_missing
- #set_param

### Files

- ChangeLog
- README.rdoc

### Class/Module Index

Quicksearch

- Termtter
- Termtter::API
- Termtter::ActiveRubytter
- Termtter::Client
- Termtter::Client::DirectMessage
- Termtter::Client::Jakigan
- Termtter::Client::SearchEvent
- Termtter::Client::UserSearchEvent
- Termtter::Command
- Termtter::CommandCanceled
- Termtter::CommandLine
- Termtter::CommandNotFound
- Termtter::Config
- Termtter::ConfigSetup
- Termtter::Crypt
- Termtter::English
- Termtter::Event
- Termtter::HTTPpool
- Termtter::Hook
- Termtter::HookCanceled
- Termtter::Hookable
- Termtter::JSONError
- Termtter::MemoryCache
- Termtter::MemoryCache::MemCacheMock
- Termtter::OptParser
- Termtter::Plugin
- Termtter::Plugin::Screen
- Termtter::Plugins
- Termtter::Plugins::Haml
- Termtter::Plugins::ListSwitch
- Termtter::RubytterProxy
- Termtter::RubytterProxy::FrequentAccessError
- Termtter::RubytterProxy::LimitManager
- Termtter::Status
- Termtter::StdOut
- Termtter::Storage
- Termtter::Storage::SQLite3
- Termtter::Storage::Status
- Termtter::Task
- Termtter::TaskManager
- Termtter::TypableIdGenerator
- Termtter::UserStreamReceiver
- Yharian
- Yharian::Alex
- Yharian::Jenifer
- Yharian::Remark
- Yharian::Speaker
- Yharian::Vicki
- Yharian::Yhara
- HatenaKeywordHaiku
- HatenaKeywordHaiku::Word
- OAuth
- OAuth::AccessToken
- Readline
- Readline::LIBREADLINE
- AAMaker
- Array
- BrowserNotFound
- Growl
- IRB
- Object
- Status
- String
- Symbol
- TermColor
- TermtterIrcGateway
- User

No matching classes.

# Termtter::Event

### Attributes

name[R]

### Public Class Methods

new(name, params = {}) click to toggle source

    # File lib/termtter/event.rb, line 6
    def initialize(name, params = {})
      raise TypeError unless name.kind_of? Symbol
      raise TypeError unless params.kind_of? Hash
      @name = name
      @params = ActiveRubytter.new(params)
    end

### Public Instance Methods

==(b) click to toggle source

    # File lib/termtter/event.rb, line 43
    def ==(b)
      self.eql?(b)
    end

Also aliased as: ===
===(b) click to toggle source
Alias for: ==
[](name) click to toggle source

    # File lib/termtter/event.rb, line 22
    def [](name)
      @params.__send__(:[], name)
    end

[]=(key, value) click to toggle source
Alias for: set_param
eql?(b) click to toggle source

    # File lib/termtter/event.rb, line 47
    def eql?(b)
      if b.kind_of? Event
        @name == b.name
      else
        @name == b
      end
    end

has_key?(key) click to toggle source

    # File lib/termtter/event.rb, line 30
    def has_key?(key)
      @params.to_hash.has_key?(key)
    end

hash() click to toggle source

    # File lib/termtter/event.rb, line 26
    def hash
      @name.hash
    end

method_missing(name, *args) click to toggle source

    # File lib/termtter/event.rb, line 16
    def method_missing(name, *args)
      @name.__send__(name, *args)
    rescue NoMethodError
      @params.__send__(name, *args)
    end

set_param(key, value) click to toggle source

    # File lib/termtter/event.rb, line 34
    def set_param(key, value)
      data = @params.to_hash
      data[key] = value
      @params.attributes = data
      value
    end

Also aliased as: []=

[Validate]

Generated with the Darkfish Rdoc Generator 2.