Permalink
Browse files

improves encapsulation

  • Loading branch information...
1 parent e752dd9 commit 5b7795c1e6dda16b9ba62a59631b5bdfe38873e4 @superacidjax committed Jul 17, 2012
Showing with 3 additions and 2 deletions.
  1. +1 −1 lib/clear_eyes/version.rb
  2. +2 −1 lib/clear_eyes/view_helpers.rb
@@ -1,3 +1,3 @@
module ClearEyes
- VERSION = "0.1.3"
+ VERSION = "0.1.4"
end
@@ -1,14 +1,15 @@
module ClearEyes
module ViewHelpers
def self.included(base)
- attr_accessor :image, :options
+ base.send(:attr_accessor, :image, :options)
end
def r_image( pixel_ratio )
insert_on = -File.extname(self.image).size-1
image_tag(self.image.insert(insert_on, "@#{pixel_ratio}x"), self.options)
end
+
def r_image_tag(image, options = {})
self.options = options
self.image = image

0 comments on commit 5b7795c

Please sign in to comment.