Class: Banner
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Banner
- Defined in:
- app/models/banner.rb
Instance Attribute Summary collapse
-
#crop_h ⇒ Object
Returns the value of attribute crop_h.
-
#crop_w ⇒ Object
Returns the value of attribute crop_w.
-
#crop_x ⇒ Object
Returns the value of attribute crop_x.
-
#crop_y ⇒ Object
Returns the value of attribute crop_y.
Instance Method Summary collapse
Instance Attribute Details
#crop_h ⇒ Object
Returns the value of attribute crop_h.
19 20 21 |
# File 'app/models/banner.rb', line 19 def crop_h @crop_h end |
#crop_w ⇒ Object
Returns the value of attribute crop_w.
19 20 21 |
# File 'app/models/banner.rb', line 19 def crop_w @crop_w end |
#crop_x ⇒ Object
Returns the value of attribute crop_x.
19 20 21 |
# File 'app/models/banner.rb', line 19 def crop_x @crop_x end |
#crop_y ⇒ Object
Returns the value of attribute crop_y.
19 20 21 |
# File 'app/models/banner.rb', line 19 def crop_y @crop_y end |
Instance Method Details
#arquivo_geometry(style = :original) ⇒ Object
28 29 30 31 |
# File 'app/models/banner.rb', line 28 def arquivo_geometry(style = :original) @geometry ||= {} @geometry[style] ||= Paperclip::Geometry.from_file(arquivo.path(style)) end |
#cropping? ⇒ Boolean
24 25 26 |
# File 'app/models/banner.rb', line 24 def cropping? !crop_x.blank? && !crop_y.blank? && !crop_w.blank? && !crop_h.blank? end |