placeholder 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,7 +30,7 @@ If you just need a square image, simply do:
30
30
 
31
31
  You can also pass CSS classes and an ID if you'd like:
32
32
 
33
- `= Placeholder.new(80, :css_id => "gravatar", :css_classes => "active admin")`
33
+ `= Placeholder.new(80, :id => "gravatar", :class => "active admin")`
34
34
 
35
35
  About the Author
36
36
  ----------------
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -1,6 +1,6 @@
1
1
  class Placeholder
2
2
 
3
- attr_accessor :height, :width, :bg_color, :fg_color, :text, :css_classes, :css_id
3
+ attr_accessor :height, :width, :bg_color, :fg_color, :text, :class, :id
4
4
 
5
5
  def initialize(size, options = {})
6
6
  measure(size)
@@ -46,8 +46,8 @@ class Placeholder
46
46
 
47
47
  def css_stuff
48
48
  str = ""
49
- str += "class=\"#{@css_classes}\"" unless @css_classes.nil?
50
- str += "id=\"#{@css_id}\"" unless @css_id.nil?
49
+ str += "class=\"#{@class}\"" unless @class.nil?
50
+ str += "id=\"#{@id}\"" unless @id.nil?
51
51
  str
52
52
  end
53
53
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{placeholder}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Darby"]
@@ -37,12 +37,12 @@ describe "Placeholder" do
37
37
  end
38
38
 
39
39
  it "should allow css_classes" do
40
- p = Placeholder.new(300, :css_classes => "c1 c2")
40
+ p = Placeholder.new(300, :class => "c1 c2")
41
41
  p.to_s.should == "<img src=\"http://placehold.it/300x300\" alt=\"placeholder\" class=\"c1 c2\" />"
42
42
  end
43
43
 
44
44
  it "should allow css_id" do
45
- p = Placeholder.new(300, :css_id => "gravatar")
45
+ p = Placeholder.new(300, :id => "gravatar")
46
46
  p.to_s.should == "<img src=\"http://placehold.it/300x300\" alt=\"placeholder\" id=\"gravatar\" />"
47
47
  end
48
48
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: placeholder
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Darby