Class: Image

Inherits:
Object
  • Object
show all
Defined in:
lib/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(photo, title, desc) ⇒ Image

Returns a new instance of Image.



7
8
9
10
11
12
13
14
15
16
# File 'lib/image.rb', line 7

def initialize(photo, title, desc)
	@title = title
	@desc = desc
	@month = Time.now.month.to_s 
	@day = Time.now.day.to_s
	@year = Time.now.year.to_s
	@date = @day + @month + @year
	@filename = photo
	@last_filename = @date + "_" +  photo
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



5
6
7
# File 'lib/image.rb', line 5

def date
  @date
end

#descObject (readonly)

Returns the value of attribute desc.



5
6
7
# File 'lib/image.rb', line 5

def desc
  @desc
end

#filenameObject (readonly)

Returns the value of attribute filename.



5
6
7
# File 'lib/image.rb', line 5

def filename
  @filename
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/image.rb', line 5

def title
  @title
end

Instance Method Details

#get_bindingObject



18
19
20
# File 'lib/image.rb', line 18

def get_binding
	binding
end