q4m 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/q4m.rb +3 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/q4m.rb CHANGED
@@ -107,13 +107,11 @@ module Q4m
107
107
 
108
108
  # Job table name.
109
109
  #
110
- # This method is here so child classes should define the tablename
111
- # that they pull out jobs from!
112
- #
113
- # TODO: resolve tablename by underscoring child-class name.
110
+ # This method is here so child classes can define the tablename
111
+ # that they pull out jobs from by overriding.
114
112
  #
115
113
  def table_name
116
- raise 'Must implement in a child class!'
114
+ self.class.gsub(/([A-Z])/, '_\1').gsub(/^_/, '').downcase + 's'
117
115
  end
118
116
 
119
117
  # Job execution.
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: q4m
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - kazuyoshi tlacaelel