Class: Gallery

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGallery

Returns a new instance of Gallery.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/gallery.rb', line 7

def initialize
	
	require 'yaml'
	
	@yamlfile = YAML::load( File.open( 'ruga.yaml' ))
	
	@title = @yamlfile["gallery_name"]
#	@desc = @yamlfile["gallery_desc"]
	@creation_date = @yamlfile["gallery_creationdate"]
	@lastedit_date = @yamlfile["gallery_lasteditdate"]
	@url = @yamlfile["gallery_url"]
	@images_list = `ls images/*.{jpg,JPG,png,PNG,gif,GIF} 2>/dev/null`.to_a
	@thumbs_list = `ls thumbs`.to_a
	
end

Instance Attribute Details

#creation_dateObject (readonly)

, :desc



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

def creation_date
  @creation_date
end

#images_listObject (readonly)

, :desc



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

def images_list
  @images_list
end

#lastedit_dateObject (readonly)

, :desc



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

def lastedit_date
  @lastedit_date
end

#titleObject (readonly)

, :desc



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

def title
  @title
end

#urlObject (readonly)

, :desc



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

def url
  @url
end

Instance Method Details

#get_bindingObject



23
24
25
# File 'lib/gallery.rb', line 23

def get_binding
	binding
end