From 8f86616050cadfc87aea6d15ca68e2f22bb8ebc8 Mon Sep 17 00:00:00 2001 From: Iain Hecker Date: Thu, 18 Mar 2010 15:39:46 +0100 Subject: [PATCH] No docs here, that's for the gh-pages branch --- doc/classes/Elo.html | 67 - doc/classes/Elo/Configuration.html | 184 - doc/classes/Elo/EloHelper.html | 124 - doc/classes/Elo/EloHelper/ClassMethods.html | 78 - doc/classes/Elo/Game.html | 193 - doc/classes/Elo/Player.html | 254 -- doc/classes/Elo/Rating.html | 141 - doc/created.rid | 1 - doc/files/README_rdoc.html | 163 - doc/files/lib/elo_rb.html | 58 - doc/fr_class_index.html | 21 - doc/fr_file_index.html | 21 - doc/fr_method_index.html | 4469 ------------------- doc/index.html | 15 - doc/rdoc-style.css | 328 -- 15 files changed, 6117 deletions(-) delete mode 100644 doc/classes/Elo.html delete mode 100644 doc/classes/Elo/Configuration.html delete mode 100644 doc/classes/Elo/EloHelper.html delete mode 100644 doc/classes/Elo/EloHelper/ClassMethods.html delete mode 100644 doc/classes/Elo/Game.html delete mode 100644 doc/classes/Elo/Player.html delete mode 100644 doc/classes/Elo/Rating.html delete mode 100644 doc/created.rid delete mode 100644 doc/files/README_rdoc.html delete mode 100644 doc/files/lib/elo_rb.html delete mode 100644 doc/fr_class_index.html delete mode 100644 doc/fr_file_index.html delete mode 100644 doc/fr_method_index.html delete mode 100644 doc/index.html delete mode 100644 doc/rdoc-style.css diff --git a/doc/classes/Elo.html b/doc/classes/Elo.html deleted file mode 100644 index 6dd4d2f..0000000 --- a/doc/classes/Elo.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - : Elo [elo ] - - - - - -
-
-

- Module - Elo -

-
    -
  1. - lib/elo.rb -
  2. -
-
-
-
-
-

- The configuration of Elo is done here. -

-

- See README.rdoc for general - information about Elo. -

-
-
-
-

Classes and Modules

- Module Elo::Configuration
- Module Elo::EloHelper
- Class Elo::Game
- Class Elo::Player
- Class Elo::Rating
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/Configuration.html b/doc/classes/Elo/Configuration.html deleted file mode 100644 index 965bfff..0000000 --- a/doc/classes/Elo/Configuration.html +++ /dev/null @@ -1,184 +0,0 @@ - - - - : Elo::Configuration [elo ] - - - - - -
-
-

- Module - Elo::Configuration -

-
    -
  1. - lib/elo.rb -
  2. -
-
-
-
-
-

Methods

-

public instance

-
    -
  1. configure
  2. -
  3. k_factor
  4. -
-
-
-
-

Attributes

-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
default_k_factor[RW] - - The default k-factor is chosen when no k-factor rules apply. K-factor rules - can be added by using the k_factor-method. (default = 15) -
default_rating[RW] - - This is the rating every player starts out with. (default = 1000) -
pro_rating_boundry[RW] - - This is the lower boundry of the rating you need to be a pro player. This - setting is used in the FIDE k-factor rules. (default = 2400) -
starter_boundry[RW] - - This is the lower boundry in the amount of games played to be a starting - player This setting is used in the FIDE k-factor rules. (default = 30) -
use_FIDE_settings[RW] - - Use the settings that FIDE use for determening the K-factor. This is the - case when all settings are unaltered. (default = true) - -

- In short: -

-
    -
  • K-factor is 25 when a player is a starter (less than 30 games played) - -
  • -
  • K-factor is 10 when a player is a pro (rating above 2400, now or in the - past) - -
  • -
  • K-factor is 15 when a player in other cases - -
  • -
-

- If you want to use your own settings, either change the boundry settings, - or set this setting to false and add you’re own k-factor rules. - K-factor rules can be added by using the k_factor-method. -

-
-
-
-
-

Public instance methods

-
- -
- configure - () {|self| ...} -
-
-

- Configure Elo in a block style. -

-
Elo.configure do |config|
  config.setting = value
end
-
-
- - [show source] - -
# File lib/elo.rb, line 68
    def configure(&block)
      yield(self)
    end
-
-
-
- -
- k_factor - (factor, &rule) -
-
-

- Add a K-factor rule. The first argument is the k-factor value. The block - should return a boolean that determines if this K-factor rule applies. The - first rule that applies is the one determining the K-factor. -

-

- The block is instance_eval‘ed into the player, so you can access all - it’s properties directly. The K-factor is recalculated every time a - match is played. -

-

- By default, the FIDE settings are used (see: use_FIDE_settings). - To implement that yourself, you could write: -

-
Elo.configure do |config|
  config.k_factor(10) { pro? or pro_rating? }
  config.k_factor(25) { starter? }
  config.default_k_factor = 15
end
-
-
- - [show source] - -
# File lib/elo.rb, line 30
    def k_factor(factor, &rule)
      k_factors << { :factor => factor, :rule => rule }
    end
-
-
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/EloHelper.html b/doc/classes/Elo/EloHelper.html deleted file mode 100644 index 5468622..0000000 --- a/doc/classes/Elo/EloHelper.html +++ /dev/null @@ -1,124 +0,0 @@ - - - - : Elo::EloHelper [elo ] - - - - - -
-
-

- Module - Elo::EloHelper -

-
    -
  1. - lib/elo.rb -
  2. -
-
-
-
-
-

- Common methods for Elo classes. -

-
-
-

Methods

-

public class

-
    -
  1. included
  2. -
  3. new
  4. -
-

public instance

-
    -
  1. attributes
  2. -
-
-
-
-

Classes and Modules

- Module Elo::EloHelper::ClassMethods
-
-
-

Public class methods

-
- -
- included - (base) -
-
- - [show source] - -
# File lib/elo.rb, line 98
    def self.included(base)
      base.extend ClassMethods
    end
-
-
-
- -
- new - (attributes) -
-
-

- Every object can be initialized with a hash, just like in ActiveRecord. -

-
-
- - [show source] - -
# File lib/elo.rb, line 103
    def initialize(attributes)
      @attributes == attributes.keys
      attributes.each do |key, value|
        self.class.attr_reader key
        instance_variable_set("@#{key}", value)
      end
      self.class.all << self
    end
-
-
-

Public instance methods

-
- -
- attributes - () -
-
-

- Get a hash of all attributes provided -

-
-
- - [show source] - -
# File lib/elo.rb, line 113
    def attributes
      hash = {}
      @attributes.each do |attribute|
        hash.update attribute => send(attribute)
      end
      hash
    end
-
-
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/EloHelper/ClassMethods.html b/doc/classes/Elo/EloHelper/ClassMethods.html deleted file mode 100644 index e9f1915..0000000 --- a/doc/classes/Elo/EloHelper/ClassMethods.html +++ /dev/null @@ -1,78 +0,0 @@ - - - - : Elo::EloHelper::ClassMethods [elo ] - - - - - -
-
-

- Module - Elo::EloHelper::ClassMethods -

-
    -
  1. - lib/elo.rb -
  2. -
-
-
-
-
-

Methods

-

public instance

-
    -
  1. all
  2. -
-
-
-
-

Public instance methods

-
- -
- all - () -
-
-

- Provides a list of all instantiated objects of the class. -

-
-
- - [show source] - -
# File lib/elo.rb, line 124
      def all
        @all ||= []
      end
-
-
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/Game.html b/doc/classes/Elo/Game.html deleted file mode 100644 index 0de697b..0000000 --- a/doc/classes/Elo/Game.html +++ /dev/null @@ -1,193 +0,0 @@ - - - - : Elo::Game [elo ] - - - - - -
-
-

- Class - Elo::Game -

-
    -
  1. - lib/elo.rb -
  2. -
-
- Parent: - Object -
-
-
-
-
-

Methods

-

public instance

-
    -
  1. draw
  2. -
  3. lose
  4. -
  5. loser=
  6. -
  7. new_rating
  8. -
  9. result=
  10. -
  11. save
  12. -
  13. win
  14. -
  15. winner=
  16. -
-
-
-
-

Included modules

-
    -
  1. EloHelper
  2. -
-
-
-
-
-

Public instance methods

-
- -
- draw - () -
-
- - [show source] - -
# File lib/elo.rb, line 229
    def draw
      self.result = 0.5
    end
-
-
-
- -
- lose - () -
-
- - [show source] - -
# File lib/elo.rb, line 225
    def lose
      self.result = 0.0
    end
-
-
-
- -
- loser= - (player) -
-
- - [show source] - -
# File lib/elo.rb, line 241
    def loser=(player)
      self.result = (player == :one ? 0.0 : 1.0)
    end
-
-
-
- -
- new_rating - (player) -
-
- - [show source] - -
# File lib/elo.rb, line 245
    def new_rating(player)
      ratings[player].new_rating
    end
-
-
-
- -
- result= - (result) -
-
-

- Result is from the perspective of player one. -

-
-
- - [show source] - -
# File lib/elo.rb, line 214
    def result=(result)
      @result = result
      one.send(:played, self)
      two.send(:played, self)
      save
    end
-
-
-
- -
- save - () -
-
-

- TODO -

-
-
- - [show source] - -
# File lib/elo.rb, line 234
    def save
    end
-
-
-
- -
- win - () -
-
- - [show source] - -
# File lib/elo.rb, line 221
    def win
      self.result = 1.0
    end
-
-
-
- -
- winner= - (player) -
-
- - [show source] - -
# File lib/elo.rb, line 237
    def winner=(player)
      self.result = (player == :one ? 1.0 : 0.0)
    end
-
-
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/Player.html b/doc/classes/Elo/Player.html deleted file mode 100644 index 15e7e1e..0000000 --- a/doc/classes/Elo/Player.html +++ /dev/null @@ -1,254 +0,0 @@ - - - - : Elo::Player [elo ] - - - - - -
-
-

- Class - Elo::Player -

-
    -
  1. - lib/elo.rb -
  2. -
-
- Parent: - Object -
-
-
-
-
-

- A player. You need at least two play a Game. -

-
-
-

Methods

-

public instance

-
    -
  1. games
  2. -
  3. games_played
  4. -
  5. k_factor
  6. -
  7. loses_from
  8. -
  9. plays_draw
  10. -
  11. pro?
  12. -
  13. pro_rating?
  14. -
  15. rating
  16. -
  17. save
  18. -
  19. starter?
  20. -
  21. versus
  22. -
  23. wins_from
  24. -
-
-
-
-

Included modules

-
    -
  1. EloHelper
  2. -
-
-
-
-
-

Public instance methods

-
- -
- games - () -
-
- - [show source] - -
# File lib/elo.rb, line 146
    def games
      @games ||= []
    end
-
-
-
- -
- games_played - () -
-
- - [show source] - -
# File lib/elo.rb, line 142
    def games_played
      @games_played ||= games.size
    end
-
-
-
- -
- k_factor - () -
-
- - [show source] - -
# File lib/elo.rb, line 168
    def k_factor
      Elo.applied_k_factors.each do |rule|
        return rule[:factor] if instance_eval(&rule[:rule])
      end
      Elo.default_k_factor
    end
-
-
-
- -
- loses_from - (other_player) -
-
- - [show source] - -
# File lib/elo.rb, line 187
    def loses_from(other_player)
      versus(other_player).lose
    end
-
-
-
- -
- plays_draw - (other_player) -
-
- - [show source] - -
# File lib/elo.rb, line 183
    def plays_draw(other_player)
      versus(other_player).draw
    end
-
-
-
- -
- pro? - () -
-
- - [show source] - -
# File lib/elo.rb, line 158
    def pro?
      !!@pro
    end
-
-
-
- -
- pro_rating? - () -
-
- - [show source] - -
# File lib/elo.rb, line 150
    def pro_rating?
      rating > Elo.pro_rating_boundry
    end
-
-
-
- -
- rating - () -
-
-

- Rating -

-
-
- - [show source] - -
# File lib/elo.rb, line 138
    def rating
      @rating ||= Elo.default_rating
    end
-
-
-
- -
- save - () -
-
-

- TODO -

-
-
- - [show source] - -
# File lib/elo.rb, line 163
    def save
      # hook for your own model
      # which I don't know yet how to do
    end
-
-
-
- -
- starter? - () -
-
- - [show source] - -
# File lib/elo.rb, line 154
    def starter?
      games_played < Elo.starter_boundry
    end
-
-
-
- -
- versus - (other_player) -
-
- - [show source] - -
# File lib/elo.rb, line 175
    def versus(other_player)
      Game.new(:one => self, :two => other_player)
    end
-
-
-
- -
- wins_from - (other_player) -
-
- - [show source] - -
# File lib/elo.rb, line 179
    def wins_from(other_player)
      versus(other_player).win
    end
-
-
-
-
-
-
- -
- - - diff --git a/doc/classes/Elo/Rating.html b/doc/classes/Elo/Rating.html deleted file mode 100644 index 3280384..0000000 --- a/doc/classes/Elo/Rating.html +++ /dev/null @@ -1,141 +0,0 @@ - - - - : Elo::Rating [elo ] - - - - - -
-
-

- Class - Elo::Rating -

-
    -
  1. - lib/elo.rb -
  2. -
-
- Parent: - Object -
-
-
-
-
-

Methods

-

public instance

-
    -
  1. change
  2. -
  3. expected
  4. -
  5. new_rating
  6. -
  7. result
  8. -
  9. valid_result?
  10. -
-
-
-
-

Included modules

-
    -
  1. EloHelper
  2. -
-
-
-
-
-

Public instance methods

-
- -
- change - () -
-
- - [show source] - -
# File lib/elo.rb, line 288
    def change
      k_factor.to_f * ( result.to_f - expected )
    end
-
-
-
- -
- expected - () -
-
- - [show source] - -
# File lib/elo.rb, line 284
    def expected
      1.0 / ( 1.0 + ( 10.0 ** ((other_rating.to_f - old_rating.to_f) / 400.0) ) )
    end
-
-
-
- -
- new_rating - () -
-
- - [show source] - -
# File lib/elo.rb, line 292
    def new_rating
      (old_rating.to_f + change).to_i
    end
-
-
-
- -
- result - () -
-
- - [show source] - -
# File lib/elo.rb, line 275
    def result
      raise "Invalid result: #{@result.inspect}" unless valid_result?
      @result.to_f
    end
-
-
-
- -
- valid_result? - () -
-
- - [show source] - -
# File lib/elo.rb, line 280
    def valid_result?
      (0..1).include? @result
    end
-
-
-
-
-
-
- -
- - - diff --git a/doc/created.rid b/doc/created.rid deleted file mode 100644 index 35a08f0..0000000 --- a/doc/created.rid +++ /dev/null @@ -1 +0,0 @@ -Sun, 14 Mar 2010 20:27:55 +0100 diff --git a/doc/files/README_rdoc.html b/doc/files/README_rdoc.html deleted file mode 100644 index beca72c..0000000 --- a/doc/files/README_rdoc.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - File: README.rdoc [elo ] - - - - - -
-
-
README.rdoc
-
- README.rdoc -
-
- Last Update: - Sun Mar 14 18:44:10 +0100 2010 -
-
-
-
-
-

Elo

-

- From Wikipedia: -

-

- The Elo rating system is a method for - calculating the relative skill levels of players in two-player games such - as chess and Go. It is named after its creator Arpad Elo, a Hungarian-born American physics - professor. -

-

- The Elo system was invented as an - improved chess rating system, but today it is also used in many other - games. It is also used as a rating system for multiplayer competition in a - number of computer games, and has been adapted to team sports including - association football, American college football and basketball, and Major - League Baseball. -

-

Links

- -

Usage

-

- You need to have at least to players that can play a game (duh). -

-
bob  = Elo::Player.new
jane = Elo::Player.new(:rating => 1500)
-

- Once you have players, you can register games in a variaty of ways. There - is more than one way to do it, choose whatever works from your other code: -

-
game1 = bob.wins_from(jane)
game2 = bob.loses_from(jane)
game3 = bob.plays_draw(jane)

game4 = bob.versus(jane)
game4.winner = jane

game5 = bob.versus(jane)
game5.loser = jane

game6 = bob.versus(jane)
game6.draw

game7 = bob.versus(jane)
game7.result = 1 # result is in perspective of bob, so bob wins
-

- You can get all kinds of info from a player: -

-
bob.rating
bob.pro?
bob.starter?
bob.pro_rating?
bob.games_played
bob.games
-

- Or get a list of players: -

-
Elo::Player.all
-

Configuration

-

- You can configure Elo in many ways. In - it’s default configuration, it is configured in the same way as the - FIDE (World Chess Foundation). -

-

- Altering settings to your liking is very easy and very flexible. You can - even specify your own K-factor rules. Have a look at the Rdoc in the code - for a complete reference. -

-

- Here is an example: -

-
Elo.configure do |config|

  # Every player starts with a rating of 1000
  config.default_rating = 1000

  # A player is considered a pro, when he/she has more than 2400 points
  config.pro_rating_boundry = 2400

  # A player is considered a new, when he/she has played less than 30 games
  config.starter_boundry = 30

end
-

About the K-factor

-

- The Elo rating system knows a variable - called the “K-factor”. The K-factor is used to reward new - talent and stableize the rating once a player is participating longer. -

-

- FIDE (the World Chess Foundation), gives players with less than 30 played - games a K-factor of 25. Normal players get a K-factor of 15 and pro’s - get a K-factor of 10. Once you reach a pro status, you’re K-factor - never changes, even if your rating drops. -

-

- You need to provide Elo the amount of - games played, their rating and their pro-status. -

-
bob = Elo::Player.new(:games_played => 29, :rating => 2300, :pro => true)
-

- You can define your own K-factors by adding K-factor rules. This code will - change the K-factor to 12, for every player who’s name starts with a - B, and 16 for everybody else. -

-
Elo.configure do |config|
  config.k_factor(12) { name =~ /^b/i }
  config.default_k_factor = 16
  config.use_FIDE_settings = false
end
-

Installation

-
gem install elo
-

Note on Patches/Pull Requests

-
    -
  • Fork the project. - -
  • -
  • Make your feature addition or bug fix. - -
  • -
  • Add tests for it. This is important so I don’t break it in a future - version unintentionally. - -
  • -
  • Commit, do not mess with rakefile, version, or history. (if you want to - have your own version, that is fine but bump version in a commit by itself - I can ignore when I pull) - -
  • -
  • Send me a pull request. Bonus points for topic branches. - -
  • -
-

Copyright

-

- Copyright © 2010 Iain Hecker. Released under the MIT License -

-
-
-
-
-
- -
- - - diff --git a/doc/files/lib/elo_rb.html b/doc/files/lib/elo_rb.html deleted file mode 100644 index 404135a..0000000 --- a/doc/files/lib/elo_rb.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - File: elo.rb [elo ] - - - - - -
-
-

elo.rb

-
- lib/elo.rb -
-
- Last Update: - Sun Mar 14 17:14:00 +0100 2010 -
-
-
-
-
-

- The configuration of Elo is done here. -

-

- See README.rdoc for general information - about Elo. -

-
-
-
-
-
- -
- - - diff --git a/doc/fr_class_index.html b/doc/fr_class_index.html deleted file mode 100644 index 2db1e54..0000000 --- a/doc/fr_class_index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Classes [elo ] - - - - - -
-

Classes

-
    -
  1. Elo -
    1. Elo::Configuration
    2. Elo::EloHelper -
      1. Elo::EloHelper::ClassMethods
      2. -
    3. Elo::Game
    4. Elo::Player
    5. Elo::Rating
    6. -
  2. -
-
- - diff --git a/doc/fr_file_index.html b/doc/fr_file_index.html deleted file mode 100644 index cfd2bba..0000000 --- a/doc/fr_file_index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Files [elo ] - - - - - -
-

Files

-
    -
  1. README.rdoc
  2. -
  3. lib/elo.rb
  4. -
  5. - show all -
  6. -
-
- - diff --git a/doc/fr_method_index.html b/doc/fr_method_index.html deleted file mode 100644 index bc32545..0000000 --- a/doc/fr_method_index.html +++ /dev/null @@ -1,4469 +0,0 @@ - - - - Methods [elo ] - - - - - -
-

Methods

- -
- -
- -
    -
  1. all (Elo::EloHelper::ClassMethods)
  2. -
  3. attributes (Elo::EloHelper)
  4. -
  5. change (Elo::Rating)
  6. -
  7. configure (Elo::Configuration)
  8. -
  9. draw (Elo::Game)
  10. -
  11. expected (Elo::Rating)
  12. -
  13. games (Elo::Player)
  14. -
  15. games_played (Elo::Player)
  16. -
  17. included (Elo::EloHelper)
  18. -
  19. k_factor (Elo::Configuration)
  20. -
  21. k_factor (Elo::Player)
  22. -
  23. lose (Elo::Game)
  24. -
  25. loser= (Elo::Game)
  26. -
  27. loses_from (Elo::Player)
  28. -
  29. new (Elo::EloHelper)
  30. -
  31. new_rating (Elo::Rating)
  32. -
  33. new_rating (Elo::Game)
  34. -
  35. plays_draw (Elo::Player)
  36. -
  37. pro? (Elo::Player)
  38. -
  39. pro_rating? (Elo::Player)
  40. -
  41. rating (Elo::Player)
  42. -
  43. result (Elo::Rating)
  44. -
  45. result= (Elo::Game)
  46. -
  47. save (Elo::Player)
  48. -
  49. save (Elo::Game)
  50. -
  51. starter? (Elo::Player)
  52. -
  53. valid_result? (Elo::Rating)
  54. -
  55. versus (Elo::Player)
  56. -
  57. win (Elo::Game)
  58. -
  59. winner= (Elo::Game)
  60. -
  61. wins_from (Elo::Player)
  62. -
-
- - diff --git a/doc/index.html b/doc/index.html deleted file mode 100644 index 54d8bdd..0000000 --- a/doc/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - elo - - - - - - - - - - - diff --git a/doc/rdoc-style.css b/doc/rdoc-style.css deleted file mode 100644 index 577d952..0000000 --- a/doc/rdoc-style.css +++ /dev/null @@ -1,328 +0,0 @@ -html, body { - height: 100%; } - -body { - font-family: Lucida Grande, Verdana, Arial, Helvetica, sans-serif; - font-size: 90%; - margin: 0; - padding: 0; - background: white; - color: black; } - -#wrapper { - min-height: 100%; - height: auto !important; - height: 100%; - margin: 0 auto -43px; } - -#footer-push { - height: 43px; } - -div.header, #footer { - background: #eee; } - -#footer { - border-top: 1px solid silver; - margin-top: 12px; - padding: 0 2em; - line-height: 30px; - text-align: center; - font-variant: small-caps; - font-size: 95%; } - -.clearing:after { - content: "."; - visibility: hidden; - height: 0; - display: block; - clear: both; } -* html .clearing { - height: 1px; } -.clearing *:first-child + html { - overflow: hidden; } - -h1, h2, h3, h4, h5, h6 { - margin: 0; - font-weight: normal; } - -a { - color: #0b3e71; } - a:hover { - background: #336699; - text-decoration: none; - color: #eef; } - -#diagram img { - border: 0; } - -#description a, .method .description a, .header a { - color: #336699; } - #description a:hover, .method .description a:hover, .header a:hover { - color: #eee; } -#description h1 a, #description h2 a, #description h3 a, #description h4 a, #description h5 a, #description h6 a, .method .description h1 a, .method .description h2 a, .method .description h3 a, .method .description h4 a, .method .description h5 a, .method .description h6 a, .header h1 a, .header h2 a, .header h3 a, .header h4 a, .header h5 a, .header h6 a { - color: #0b3e71; } - -ol { - margin: 0; - padding: 0; - list-style: none; } - ol li { - margin-left: 0; - white-space: nowrap; } - ol li.other { - display: none; } - -ol.expanded li.other { - display: list-item; } - -table { - margin-bottom: 1em; - font-size: 1em; - border-collapse: collapse; } - table td, table th { - padding: .4em .8em; } - table thead { - background-color: #e8e8e8; } - table thead th { - font-variant: small-caps; - color: #666666; } - table tr { - border-bottom: 1px solid silver; } - -#index a.show, div.header a.show { - text-decoration: underline; - font-style: italic; - color: #666666; } - #index a.show:after, div.header a.show:after { - content: " ..."; } - #index a.show:hover, div.header a.show:hover { - color: black; - background: #ffe; } - -#index { - font: 85%/1.2 Arial, Helvetica, sans-serif; } - #index a { - text-decoration: none; } - #index h1 { - padding: .2em .5em .1em; - background: #ccc; - font: small-caps 1.2em Georgia, serif; - color: #333; - border-bottom: 1px solid gray; } - #index form { - margin: 0; - padding: 0; } - #index form input { - margin: .4em 3px 0 .4em; - width: 80%; } - #index form #search.untouched { - color: #777777; } - #index form .clear_button { - -moz-border-radius: 7px; - -webkit-border-radius: 7px; - background: #AAA; - color: white; - padding: 0 5px 1px 5px; - cursor: pointer; } - #index ol { - padding: .4em .5em; } - #index ol li { - white-space: nowrap; } - #index #index-entries li a { - padding: 1px 2px; } - #index #index-entries.classes { - font-size: 1.1em; } - #index #index-entries.classes ol { - padding: 0; } - #index #index-entries.classes span.nodoc { - display: none; } - #index #index-entries.classes span.nodoc, #index #index-entries.classes a { - font-weight: bold; } - #index #index-entries.classes .parent { - font-weight: normal; } - #index #index-entries.methods li, #index #search-results.methods li { - margin-bottom: 0.2em; } - #index #index-entries.methods li a .method_name, #index #search-results.methods li a .method_name { - margin-right: 0.25em; } - #index #index-entries.methods li a .module_name, #index #search-results.methods li a .module_name { - color: #666666; } - #index #index-entries.methods li a:hover .module_name, #index #search-results.methods li a:hover .module_name { - color: #ddd; } - -#attribute-list .context-item-name { - font-weight: bold; } - -div.header { - font-size: 80%; - padding: .5em 2%; - font-family: Arial, Helvetica, sans-serif; - border-bottom: 1px solid silver; } - div.header .name { - font-size: 1.6em; - font-family: Georgia, serif; } - div.header .name .type { - color: #666666; - font-size: 80%; - font-variant: small-caps; } - div.header h1.name { - font-size: 2.2em; } - div.header .paths, div.header .last-update, div.header .parent { - color: #666666; } - div.header .last-update .datetime { - color: #484848; } - div.header .parent { - margin-top: .3em; } - div.header .parent strong { - font-weight: normal; - color: #484848; } - -#content { - padding: 12px 2%; } - div.class #content { - position: relative; - width: 72%; } - #content pre, #content .method .synopsis { - font: 14px Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; } - #content pre { - color: black; - background: #eee; - border: 1px solid silver; - padding: .5em .8em; - overflow: auto; } - #content p code, #content p tt, #content li code, #content li tt, #content dl code, #content dl tt { - font: 14px Monaco, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; - background: #ffffe3; - padding: 2px 3px; - line-height: 1.4; } - #content h1 code, #content h1 tt, #content h2 code, #content h2 tt, #content h3 code, #content h3 tt, #content h4 code, #content h4 tt, #content h5 code, #content h5 tt, #content h6 code, #content h6 tt { - font-size: 1.1em; } - #content #text { - position: relative; } - #content #description p { - margin-top: .5em; } - #content #description h1, #content #description h2, #content #description h3, #content #description h4, #content #description h5, #content #description h6 { - font-family: Georgia, serif; } - #content #description h1 { - font-size: 2.2em; - margin-bottom: .2em; - border-bottom: 3px double #d8d8d8; - padding-bottom: .1em; } - #content #description h2 { - font-size: 1.8em; - color: #0e3062; - margin: .8em 0 .3em 0; } - #content #description h3 { - font-size: 1.6em; - margin: .8em 0 .3em 0; - color: #666666; } - #content #description h4 { - font-size: 1.4em; - margin: .8em 0 .3em 0; } - #content #description h5 { - font-size: 1.2em; - margin: .8em 0 .3em 0; - color: #0e3062; } - #content #description h6 { - font-size: 1.0em; - margin: .8em 0 .3em 0; - color: #666666; } - #content #description ul, #content #description ol, #content .method .description ul, #content .method .description ol { - margin: .8em 0; - padding-left: 1.5em; } - #content #description ol, #content .method .description ol { - list-style: decimal; } - #content #description ol li, #content .method .description ol li { - white-space: normal; } - -#method-list { - position: absolute; - top: 0px; - right: -33%; - width: 28%; - background: #eee; - border: 1px solid silver; - padding: .4em 1%; - overflow: hidden; } - #method-list h2 { - font-size: 1.3em; } - #method-list h3 { - font-variant: small-caps; - text-transform: capitalize; - font-family: Georgia, serif; - color: #666; - font-size: 1.1em; } - #method-list ol { - padding: 0 0 .5em .5em; } - -#context { - border-top: 1px dashed silver; - margin-top: 1em; - margin-bottom: 1em; } - -#context h2, #section h2 { - font: small-caps 1.2em Georgia, serif; - color: #444; - margin: 1em 0 .2em 0; } - -#methods .method { - border: 1px solid silver; - margin-top: .5em; - background: #eee; } - #methods .method .synopsis { - color: black; - background: silver; - padding: .2em 1em; } - #methods .method .synopsis .name { - font-weight: bold; } - #methods .method .synopsis a { - text-decoration: none; } - #methods .method .description { - padding: 0 1em; } - #methods .method .description pre { - background: #f8f8f8; } - #methods .method .source { - margin: .5em 0; } - #methods .method .source-toggle { - font-size: 85%; - margin-left: 1em; } -#methods .public-class { - background: #ffffe4; } -#methods .public-instance .synopsis { - color: #eee; - background: #336699; } - -#content .method .source pre { - background: #262626; - color: #ffdead; - margin: 1em; - padding: 0.5em; - border: 1px dashed #999; - overflow: auto; } - #content .method .source pre .ruby-constant { - color: #7fffd4; - background: transparent; } - #content .method .source pre .ruby-keyword { - color: #00ffff; - background: transparent; } - #content .method .source pre .ruby-ivar { - color: #eedd82; - background: transparent; } - #content .method .source pre .ruby-operator { - color: #00ffee; - background: transparent; } - #content .method .source pre .ruby-identifier { - color: #ffdead; - background: transparent; } - #content .method .source pre .ruby-node { - color: #ffa07a; - background: transparent; } - #content .method .source pre .ruby-comment { - color: #b22222; - font-weight: bold; - background: transparent; } - #content .method .source pre .ruby-regexp { - color: #ffa07a; - background: transparent; } - #content .method .source pre .ruby-value { - color: #7fffd4; - background: transparent; }