lafcadio 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -33,8 +33,7 @@ module Lafcadio
33
33
  end
34
34
  end
35
35
 
36
- class MissingError < RuntimeError
37
- end
36
+ class MissingError < RuntimeError; end
38
37
  end
39
38
 
40
39
  class String
@@ -47,36 +46,6 @@ class String
47
46
 
48
47
  end
49
48
 
50
- # Returns the number of times that <tt>regexp</tt> occurs in the string.
51
- def count_occurrences(regexp)
52
- count = 0
53
- str = self.clone
54
- while str =~ regexp
55
- count += 1
56
- str = $'
57
- end
58
- count
59
- end
60
-
61
- # Decapitalizes the first letter of the string, or decapitalizes the
62
- # entire string if it's all capitals.
63
- #
64
- # 'InternalClient'.decapitalize -> "internalClient"
65
- # 'SKU'.decapitalize -> "sku"
66
- def decapitalize
67
- string = clone
68
- firstLetter = string[0..0].downcase
69
- string = firstLetter + string[1..string.length]
70
- newString = ""
71
- while string =~ /([A-Z])([^a-z]|$)/
72
- newString += $`
73
- newString += $1.downcase
74
- string = $2 + $'
75
- end
76
- newString += string
77
- newString
78
- end
79
-
80
49
  # Left-pads a string with +fillChar+ up to +size+ size.
81
50
  #
82
51
  # "a".pad( 10, "+") -> "+++++++++a"
@@ -22,18 +22,13 @@ module Lafcadio
22
22
  def self.set_values( value_hash ); @@value_hash = value_hash; end
23
23
 
24
24
  def initialize
25
- #puts "initialize " + @@filename.inspect
26
25
  if @@value_hash
27
26
  @@value_hash.each { |key, value| self[key] = value }
28
- # elsif @@filename
29
- else
30
- #puts caller.inspect
27
+ elsif @@filename
31
28
  File.new( @@filename ).each_line { |line|
32
29
  line.chomp =~ /^(.*?):(.*)$/
33
30
  self[$1] = $2
34
31
  }
35
- # else
36
- # raise
37
32
  end
38
33
  end
39
34
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.6
3
3
  specification_version: 1
4
4
  name: lafcadio
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.9.0
7
- date: 2005-10-23
6
+ version: 0.9.1
7
+ date: 2005-12-23
8
8
  summary: Lafcadio is an object-relational mapping layer
9
9
  require_paths:
10
10
  - lib