code
stringlengths
1
1.73M
language
stringclasses
1 value
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/reaper'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/process/inspector'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/benchmarker'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/profiler'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../../config/boot' require 'commands/performance/request'
Ruby
#!/usr/bin/env ruby require File.dirname(__FILE__) + '/../config/boot' require 'commands/generate'
Ruby
# Methods added to this helper will be available to all templates in the application. module ApplicationHelper class CustomFormBuilder < ActionView::Helpers::FormBuilder (field_helpers + %w(submit date_select)).each do |selector| if selector == "submit" src = <<-ENDSTR def submit(field, ...
Ruby
module UserHelper end
Ruby
class User < ActiveRecord::Base before_save :crypte_password #数据库 不保存明文密码是所以 需要手工声明 password属性 attr_accessor :password, :password_confirmation validates_confirmation_of :password validates_presence_of :email, :name, :password validates_uniqueness_of :email validates_format_of :email, :with => ...
Ruby
class UserController < ApplicationController def index end end
Ruby
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base helper :all # include all helpers, all the time # See ActionController::RequestForgeryProtection for details...
Ruby
# Be sure to restart your server when you modify this file. # Add new inflection rules using the following format # (all these examples are active by default): # ActiveSupport::Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person',...
Ruby
# These settings change the behavior of Rails 2 apps and will be defaults # for Rails 3. You can remove this initializer when Rails 3 is released. if defined?(ActiveRecord) # Include Active Record class name as root for JSON serialized output. ActiveRecord::Base.include_root_in_json = true # Store the full clas...
Ruby
# Be sure to restart your server when you modify this file. # Add new mime types for use in respond_to blocks: # Mime::Type.register "text/richtext", :rtf # Mime::Type.register_alias "text/html", :iphone
Ruby
ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect 'products/:id', :controller => 'catalog', :action => 'view' # Keep in mind you can assign values other than :controller and :action # ...
Ruby
# Don't change this file! # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) module Rails class << self def boot! unless booted? preinitialize pick_boot.run end end def booted? ...
Ruby
# Be sure to restart your server when you modify this file # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present RAILS_GEM_VERSION = '2.2...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The production environment is meant for finished, "live" apps. # Code is not reloaded between requests config.cache_classes = true # Enable threaded mode # config.threadsafe! # Use a different logger for distributed setups # config....
Ruby
# Settings specified here will take precedence over those in config/environment.rb # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the webserver when you make code changes. config.ca...
Ruby
# Settings specified here will take precedence over those in config/environment.rb # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "scratch space" for the test suite and is wiped # and recreated between...
Ruby
# Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. require(File.join(File.dirname(__FILE__), 'config', 'boot')) require 'rake' require 'rake/testtask' require 'rake/rdoctask' require 'tasks/rails'
Ruby
# = Overview: # A simple to use module for generating RFC compliant MIME mail # --- # = License: # Author:: David Powers # Copyright:: May, 2005 # License:: Ruby License # --- # = Usage: # require 'net/smtp' # require 'rubygems' # require 'mailfactory' # # # mail = MailFactory.new() # mail.to = "test@test.com...
Ruby
catid_array=[] open("category2.txt") { |f| f.each{|line| catid_array << line }} catid_array.each do |x| catid_array.delete(x) if x =="\n" catid_array.delete(x) if x ==" \n" end catid_array.each do |x| x.gsub!("\n","") x.gsub!("\"","") x.gsub!("\"","") end ID_cat_array =[] catid_array.each do |x...
Ruby
file_list_array = Dir.open('google_keywords'){|d|d.grep(/google_keywords.*\.txt/)} keywords_array=[] into_onefile = "#{Time.now.strftime('%m%d_%H%M')}all_keywords_into_onefile.txt" line_array=[] file_list_array.each do |file| open('google_keywords\\' + file) { |f| f.each{|line| line_array << line ...
Ruby
# An IRC server and channel. The server property is of the form # "[address]:[port]". class Channel < DataMapper::Base property :server, :string, :nullable => false property :name, :string, :nullable => false has_many :scores end
Ruby
# A person's nickname. If someone changes a person's points using this nickname, # the correct Person instance has their points changed. class Pseudonym < DataMapper::Base property :name, :string, :nullable => false belongs_to :person end
Ruby
require 'facets/conversion' # Utility methods used by Scorekeeper. module ScorekeeperHelper def parse_date(str) date = nil begin date = Chronic.parse(str, :context => :past, :guess => false) rescue NameError begin date = Date.parse(str) rescue ArgumentError end end ...
Ruby
# A change to a person's score. class Score < DataMapper::Base property :change, :integer, :nullable => false, :default => 0 property :note, :string property :created_at, :datetime belongs_to :giver, :class => 'Person' belongs_to :receiver, :class => 'Person' belongs_to :channel end
Ruby
# An IRC member who can give or receive points. class Person < DataMapper::Base property :server, :string, :nullable => false property :name, :string, :nullable => false property :authorized, :boolean, :nullable => false, :default => true has_many :scores, :class => 'Score', :foreign_key => 'receiver_id' ...
Ruby
require 'rake' require 'facets/symbol/to_proc' require 'facets/stylize' require 'libs/genesis' task :default do puts 'Type "rake --tasks" to see a list of tasks you can perform.' end # Load the Autumn environment. task :environment do AL_ROOT = File.dirname(__FILE__) @genesis = Autumn::Genesis.new @genesis.lo...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Destroys the files for leaves, seasons, and other objects of the Autumn # framework. # # == Usage # # script/destroy <options> <object> <name> # # <object>:: The object type to destroy. Valid types are "leaf" and "season". # <name>:: The name of the object to destroy. For example...
Ruby
#!/usr/bin/env ruby # # Controller for the Autumn daemon. Starts, stops, and manages the daemon. Must # be run from the Autumn root directory. # # Usage: script/daemon <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop ...
Ruby
#!/usr/bin/env ruby # # Runs Autumn from the command line. This script will not exit until all leaves # have exited. To use this script as a daemon, see the script/daemon script. AL_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") Dir.chdir AL_ROOT require 'libs/genesis' Autumn::Genesis.new.boot!
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Generates template files for leaves, seasons, and other Autumn objects. # # == Usage # # script/generate <options> <template> <name> # # <template>:: The template to create. Valid templates are "leaf" and "season". # <name>:: The name to give the created template. For example, yo...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Destroys the files for leaves, seasons, and other objects of the Autumn # framework. # # == Usage # # script/destroy <options> <object> <name> # # <object>:: The object type to destroy. Valid types are "leaf" and "season". # <name>:: The name of the object to destroy. For example...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Generates template files for leaves, seasons, and other Autumn objects. # # == Usage # # script/generate <options> <template> <name> # # <template>:: The template to create. Valid templates are "leaf" and "season". # <name>:: The name to give the created template. For example, yo...
Ruby
#!/usr/bin/env ruby # # Runs Autumn from the command line. This script will not exit until all leaves # have exited. To use this script as a daemon, see the script/daemon script. AL_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") Dir.chdir AL_ROOT require 'libs/genesis' Autumn::Genesis.new.boot!
Ruby
#!/usr/bin/env ruby # # Controller for the Autumn daemon. Starts, stops, and manages the daemon. Must # be run from the Autumn root directory. # # Usage: script/daemon <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop ...
Ruby
require 'singleton' require 'facets/hash/rekey' require 'facets/hash/autonew' require 'facets/symbol/to_proc' module Autumn # The Speciator stores the global, season, stem, and leaf configurations. It # generates composite hashes, so that any leaf or stem can know its specific # configuration as a combination o...
Ruby
module Autumn # A collection of convenience methods that are added to the Stem class. These # methods serve two purposes; one, to allow easier backwards compatibility # with Autumn Leaves 1.0 (which had a simpler one-stem-per-leaf approach), and # two, to make it easier or more Ruby-like to perform certain I...
Ruby
# Miscellaneous extra methods and objects used by Autumn. require 'thread' require 'facets/string/case' require 'facets/stylize' module Kernel # :nodoc: # Bugfix for the Facets implementation of +respond+. def respond(sym, *args) return nil if not respond_to?(sym) send(sym, *args) end end class N...
Ruby
require 'facets/array/only' require 'facets/symbol/to_proc' module Autumn # :nodoc: # Helper class that generates shell Ruby code. This class knows how to # generate Ruby code for template classes and methods. class Coder # :nodoc: # The generated code string. attr :output # Creates a new ...
Ruby
require 'yaml' require 'singleton' require 'facets/stylize' module Autumn # Loads Stems and Leaves and executes them in their own threads. Manages the # threads and oversees all leaves. This is a singleton class. class Foliater include Singleton # The Speciator singleton. attr_reader :config ...
Ruby
require 'facets/string/partitions' require 'facets/array/only' module Autumn # Describes an IRC server daemon program. Different IRC servers run off of # different IRC daemons, each of which has a slightly different implementation # of the IRC protocol. To encapsulate this, the Daemon class stores the names ...
Ruby
require 'time' module Autumn # A listener for a Stem that listens for and handles CTCP requests. You can # add CTCP support for your IRC client by instantiating this object and # passing it to the Stem#add_listener method. # # CTCP stands for Client-to-Client Protocol and is a way that IRC clients and # s...
Ruby
require 'getoptlong' require 'rdoc/usage' require 'libs/generator' module Autumn # :nodoc: # Manages data used by the script/generate and script/destroy scripts. This # class is instantiated by the script, and manages the script's data and # encapsulates common functionality between the two scripts. The objec...
Ruby
module Autumn # A special kind of leaf that only responds to messages sent to certain # channels. Leaves that subclass ChannelLeaf can, in their leaves.yml config, # specify a +channels+ option that narrows down which channels the leaf # listens to. The leaf will not invoke the hook methods nor the # <tt>*...
Ruby
require 'socket' require 'openssl' require 'facets/array/only' require 'facets/symbol/to_proc' require 'facets/enumerable/mash' #require 'facets/kernel/respond' require 'facets/string/indexable' require 'facets/string/partitions' module Autumn # A connection to an IRC server. The stem acts as the IRC client on wh...
Ruby
require 'yaml' require 'facets/stylize' require 'libs/misc' require 'libs/coder' module Autumn # :nodoc: # Generates the files for Autumn templates such as leaves and seasons. The # contents of these template files are populated by an LeafCoder instance. class Generator # :nodoc: # The names of the req...
Ruby
require 'facets/array/only' module Autumn # This class is a facade for Ruby's +Logger+ that adds additional information # to log entries. LogFacade will pass any method calls onto a Logger instance, # but reformat log entries to include an Autumn object's type and name. # # For example, if you wanted a Lo...
Ruby
require 'rubygems' require 'yaml' require 'logger' require 'libs/misc' require 'libs/speciator' module Autumn # :nodoc: # Oversight class responsible for initializing the Autumn environment. To boot # the Autumn environment start all configured leaves, you make an instance of # this class and run the boot! me...
Ruby
require 'yaml' require 'timeout' require 'facets/string/partitions' require 'facets/array/only' require 'facets/stylize' require 'libs/formatting' module Autumn # This is the superclass that all Autumn leaves use. To write a leaf, sublcass # this class and implement methods for each of your leaf's commands. You...
Ruby
# This source file, originating from Ruby on Rails, extends the +Class+ class to # allows attributes to be shared within an inheritance hierarchy, but where each # descendant gets a copy of their parents' attributes, instead of just a pointer # to the same. This means that the child can add elements to, for example, an...
Ruby
module Autumn # Adds text formatting to Autumn objects. Text formatting (color and styles) # is not a part of the original IRC spec, so many clients have come up with # many different ways of sending formatted text. The classes in this module # encapsulate those various methods. # # To add formatting to ...
Ruby
require 'data_mapper' # Install the "chronic" gem for more robust date parsing begin gem 'chronic' require 'chronic' rescue Gem::LoadError end # An Autumn Leaf used for an in-channel scorekeeping system. This can operate # both as an open or closed score system. (In the former, new members are # automatically adde...
Ruby
#!/usr/bin/ruby # # Controller for the Autumn Leaves daemon. Starts, stops, and manages the # daemon. # # Usage: big-switch.rb <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop stop all instances of the applicati...
Ruby
require 'rake' require 'yaml' # Load the AutumnLeaves environment. task :environment do # Load the global settings root = File.dirname(__FILE__) begin $AL_ENV = YAML.load(File.open("#{root}/config/global.yml")) rescue SystemCallError raise "Couldn't find your global.yml file." end $AL_ENV['root'] =...
Ruby
#!/usr/bin/ruby # # Controller for the Autumn Leaves daemon. Starts, stops, and manages the # daemon. # # Usage: big-switch.rb <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop stop all instances of the applicati...
Ruby
# Loads configuration files, loads leaves and support files, then starts the # Foliater. require 'yaml' # Add each_char method to String. class String # :nodoc: # Yields each character of the string as an Integer in succession. def each_char (0..(length-1)).each { |index| yield self[index] } end end # Load...
Ruby
true # placed here to prevent the class doc from becoming the file doc # The Observant Squirrel is the logging class for leaves to use. This logger # works very similarly to the Ruby on Rails logger. The logger uses five # severity levels, +debug+, +info+, +warn+, and +error+ (in order). It will only # log messages wh...
Ruby
require 'yaml' require 'singleton' # Loads leaves and executes them in their own threads. Manages the threads and # oversees all leaves. This is a singleton class; access the instance with the # +instance+ class method. class Foliater include Singleton # Loads the leaves specified in a given YAML file. See the RE...
Ruby
# # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # < _ [ at ] dominiek.com > wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can bu...
Ruby
require 'yaml' require "#{$AL_ENV['root']}/libs/EyeAreSee" # This is the superclass that all Autumn Leaves use. To write a leaf, sublcass # this class and implement methods for each of your leaf's commands. Your leaf's # repertoire of commands is derived from the names of the methods you write. For # instance, to hav...
Ruby
# This source file, originating from Ruby on Rails, extends the +Class+ class to # allows attributes to be shared within an inheritance hierarchy, but where each # descendant gets a copy of their parents' attributes, instead of just a pointer # to the same. This means that the child can add elements to, for example, an...
Ruby
# An Autumn Leaf used for an in-channel scorekeeping system. This is an open # scorekeeping system: New members are added once they receive points for the # first time, and anyone can add or remove points from anyone except themselves. # There is no administrative functionality. # # *Usage* # # !points [name]:: Get a p...
Ruby
# An IRC server and channel. The server property is of the form # "[address]:[port]". class Channel < DataMapper::Base property :server, :string, :nullable => false property :name, :string, :nullable => false has_many :scores end
Ruby
# A person's nickname. If someone changes a person's points using this nickname, # the correct Person instance has their points changed. class Pseudonym < DataMapper::Base property :name, :string, :nullable => false belongs_to :person end
Ruby
require 'facets/conversion' # Utility methods used by Scorekeeper. module ScorekeeperHelper def parse_date(str) date = nil begin date = Chronic.parse(str, :context => :past, :guess => false) rescue NameError begin date = Date.parse(str) rescue ArgumentError end end ...
Ruby
# A change to a person's score. class Score < DataMapper::Base property :change, :integer, :nullable => false, :default => 0 property :note, :string property :created_at, :datetime belongs_to :giver, :class => 'Person' belongs_to :receiver, :class => 'Person' belongs_to :channel end
Ruby
# An IRC member who can give or receive points. class Person < DataMapper::Base property :server, :string, :nullable => false property :name, :string, :nullable => false property :authorized, :boolean, :nullable => false, :default => true has_many :scores, :class => 'Score', :foreign_key => 'receiver_id' ...
Ruby
require 'rake' require 'facets/symbol/to_proc' require 'facets/stylize' require 'libs/genesis' task :default do puts 'Type "rake --tasks" to see a list of tasks you can perform.' end # Load the Autumn environment. task :environment do AL_ROOT = File.dirname(__FILE__) @genesis = Autumn::Genesis.new @genesis.lo...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Destroys the files for leaves, seasons, and other objects of the Autumn # framework. # # == Usage # # script/destroy <options> <object> <name> # # <object>:: The object type to destroy. Valid types are "leaf" and "season". # <name>:: The name of the object to destroy. For example...
Ruby
#!/usr/bin/env ruby # # Controller for the Autumn daemon. Starts, stops, and manages the daemon. Must # be run from the Autumn root directory. # # Usage: script/daemon <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop ...
Ruby
#!/usr/bin/env ruby # # Runs Autumn from the command line. This script will not exit until all leaves # have exited. To use this script as a daemon, see the script/daemon script. AL_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") Dir.chdir AL_ROOT require 'libs/genesis' Autumn::Genesis.new.boot!
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Generates template files for leaves, seasons, and other Autumn objects. # # == Usage # # script/generate <options> <template> <name> # # <template>:: The template to create. Valid templates are "leaf" and "season". # <name>:: The name to give the created template. For example, yo...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Destroys the files for leaves, seasons, and other objects of the Autumn # framework. # # == Usage # # script/destroy <options> <object> <name> # # <object>:: The object type to destroy. Valid types are "leaf" and "season". # <name>:: The name of the object to destroy. For example...
Ruby
#!/usr/bin/env ruby # # == Synopsis # # Generates template files for leaves, seasons, and other Autumn objects. # # == Usage # # script/generate <options> <template> <name> # # <template>:: The template to create. Valid templates are "leaf" and "season". # <name>:: The name to give the created template. For example, yo...
Ruby
#!/usr/bin/env ruby # # Runs Autumn from the command line. This script will not exit until all leaves # have exited. To use this script as a daemon, see the script/daemon script. AL_ROOT = File.expand_path("#{File.dirname(__FILE__)}/..") Dir.chdir AL_ROOT require 'libs/genesis' Autumn::Genesis.new.boot!
Ruby
#!/usr/bin/env ruby # # Controller for the Autumn daemon. Starts, stops, and manages the daemon. Must # be run from the Autumn root directory. # # Usage: script/daemon <command> <options> -- <application options> # # * where <command> is one of: # start start an instance of the application # stop ...
Ruby
require 'singleton' require 'facets/hash/rekey' require 'facets/hash/autonew' require 'facets/symbol/to_proc' module Autumn # The Speciator stores the global, season, stem, and leaf configurations. It # generates composite hashes, so that any leaf or stem can know its specific # configuration as a combination o...
Ruby
module Autumn # A collection of convenience methods that are added to the Stem class. These # methods serve two purposes; one, to allow easier backwards compatibility # with Autumn Leaves 1.0 (which had a simpler one-stem-per-leaf approach), and # two, to make it easier or more Ruby-like to perform certain I...
Ruby
# Miscellaneous extra methods and objects used by Autumn. require 'thread' require 'facets/string/case' require 'facets/stylize' module Kernel # :nodoc: # Bugfix for the Facets implementation of +respond+. def respond(sym, *args) return nil if not respond_to?(sym) send(sym, *args) end end class N...
Ruby
require 'facets/array/only' require 'facets/symbol/to_proc' module Autumn # :nodoc: # Helper class that generates shell Ruby code. This class knows how to # generate Ruby code for template classes and methods. class Coder # :nodoc: # The generated code string. attr :output # Creates a new ...
Ruby
require 'yaml' require 'singleton' require 'facets/stylize' module Autumn # Loads Stems and Leaves and executes them in their own threads. Manages the # threads and oversees all leaves. This is a singleton class. class Foliater include Singleton # The Speciator singleton. attr_reader :config ...
Ruby
require 'facets/string/partitions' require 'facets/string/indexable' require 'facets/array/only' module Autumn # Describes an IRC server daemon program. Different IRC servers run off of # different IRC daemons, each of which has a slightly different implementation # of the IRC protocol. To encapsulate this, t...
Ruby
require 'time' module Autumn # A listener for a Stem that listens for and handles CTCP requests. You can # add CTCP support for your IRC client by instantiating this object and # passing it to the Stem#add_listener method. # # CTCP stands for Client-to-Client Protocol and is a way that IRC clients and # s...
Ruby
require 'getoptlong' require 'rdoc/usage' require 'libs/generator' module Autumn # :nodoc: # Manages data used by the script/generate and script/destroy scripts. This # class is instantiated by the script, and manages the script's data and # encapsulates common functionality between the two scripts. The objec...
Ruby
module Autumn # A special kind of leaf that only responds to messages sent to certain # channels. Leaves that subclass ChannelLeaf can, in their leaves.yml config, # specify a +channels+ option that narrows down which channels the leaf # listens to. The leaf will not invoke the hook methods nor the # <tt>*...
Ruby
require 'thread' require 'socket' require 'openssl' require 'facets/array/only' require 'facets/symbol/to_proc' require 'facets/enumerable/mash' #require 'facets/kernel/respond' require 'facets/string/indexable' require 'facets/string/partitions' require 'facets/annotations' module Autumn # A connection to an IRC...
Ruby
require 'yaml' require 'facets/stylize' require 'libs/misc' require 'libs/coder' module Autumn # :nodoc: # Generates the files for Autumn templates such as leaves and seasons. The # contents of these template files are populated by an LeafCoder instance. class Generator # :nodoc: # The names of the req...
Ruby
require 'facets/array/only' module Autumn # This class is a facade for Ruby's +Logger+ that adds additional information # to log entries. LogFacade will pass any method calls onto a Logger instance, # but reformat log entries to include an Autumn object's type and name. # # For example, if you wanted a Lo...
Ruby
require 'rubygems' require 'yaml' require 'logger' require 'libs/misc' require 'libs/speciator' module Autumn # :nodoc: # Oversight class responsible for initializing the Autumn environment. To boot # the Autumn environment start all configured leaves, you make an instance of # this class and run the boot! me...
Ruby
require 'yaml' require 'timeout' require 'facets/string/partitions' require 'facets/array/only' require 'facets/stylize' require 'libs/formatting' module Autumn # This is the superclass that all Autumn leaves use. To write a leaf, sublcass # this class and implement methods for each of your leaf's commands. You...
Ruby
# This source file, originating from Ruby on Rails, extends the +Class+ class to # allows attributes to be shared within an inheritance hierarchy, but where each # descendant gets a copy of their parents' attributes, instead of just a pointer # to the same. This means that the child can add elements to, for example, an...
Ruby
module Autumn # Adds text formatting to Autumn objects. Text formatting (color and styles) # is not a part of the original IRC spec, so many clients have come up with # many different ways of sending formatted text. The classes in this module # encapsulate those various methods. # # To add formatting to ...
Ruby