Class: Crimagify::Image

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
DinamicImageMethods
Defined in:
app/models/crimagify/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from DinamicImageMethods

build_methods_images, build_sizes_images

Instance Attribute Details

#crop_hObject

Returns the value of attribute crop_h.



12
13
14
# File 'app/models/crimagify/image.rb', line 12

def crop_h
  @crop_h
end

#crop_wObject

Returns the value of attribute crop_w.



12
13
14
# File 'app/models/crimagify/image.rb', line 12

def crop_w
  @crop_w
end

#crop_xObject

Returns the value of attribute crop_x.



12
13
14
# File 'app/models/crimagify/image.rb', line 12

def crop_x
  @crop_x
end

#crop_yObject

Returns the value of attribute crop_y.



12
13
14
# File 'app/models/crimagify/image.rb', line 12

def crop_y
  @crop_y
end

Instance Method Details

#crop_avatar_realObject



20
21
22
# File 'app/models/crimagify/image.rb', line 20

def crop_avatar_real
  image.recreate_versions! if crop_x.present?
end

#crop_avatar_temporalObject



14
15
16
17
18
# File 'app/models/crimagify/image.rb', line 14

def crop_avatar_temporal
	if image_temporal.present? 		
    image_temporal.recreate_versions! if crop_x.present?
	end
end