Class: Gallery
- Inherits:
-
Object
- Object
- Gallery
- Defined in:
- lib/gallery.rb
Instance Attribute Summary collapse
-
#creation_date ⇒ Object
readonly
, :desc.
-
#images_list ⇒ Object
readonly
, :desc.
-
#lastedit_date ⇒ Object
readonly
, :desc.
-
#title ⇒ Object
readonly
, :desc.
-
#url ⇒ Object
readonly
, :desc.
Instance Method Summary collapse
- #get_binding ⇒ Object
-
#initialize ⇒ Gallery
constructor
A new instance of Gallery.
Constructor Details
#initialize ⇒ Gallery
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_date ⇒ Object (readonly)
, :desc
5 6 7 |
# File 'lib/gallery.rb', line 5 def creation_date @creation_date end |
#images_list ⇒ Object (readonly)
, :desc
5 6 7 |
# File 'lib/gallery.rb', line 5 def images_list @images_list end |
#lastedit_date ⇒ Object (readonly)
, :desc
5 6 7 |
# File 'lib/gallery.rb', line 5 def lastedit_date @lastedit_date end |
#title ⇒ Object (readonly)
, :desc
5 6 7 |
# File 'lib/gallery.rb', line 5 def title @title end |
#url ⇒ Object (readonly)
, :desc
5 6 7 |
# File 'lib/gallery.rb', line 5 def url @url end |
Instance Method Details
#get_binding ⇒ Object
23 24 25 |
# File 'lib/gallery.rb', line 23 def get_binding binding end |