Class: GnomeWallpaperSlideshow::Wallpaper
- Inherits:
-
Object
- Object
- GnomeWallpaperSlideshow::Wallpaper
- Defined in:
- lib/gnome-wallpaper-slideshow/wallpaper.rb
Overview
Represents a wallpaper entry in a slideshow
Instance Attribute Summary collapse
-
#duration ⇒ Object
Returns the value of attribute duration.
-
#filename ⇒ Object
Returns the value of attribute filename.
-
#transition_time ⇒ Object
Returns the value of attribute transition_time.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(filename, duration = 1795.0, transition_time = 5.0) ⇒ Wallpaper
constructor
Create a new wallpaper.
Constructor Details
#initialize(filename, duration = 1795.0, transition_time = 5.0) ⇒ Wallpaper
Create a new wallpaper
10 11 12 13 14 |
# File 'lib/gnome-wallpaper-slideshow/wallpaper.rb', line 10 def initialize(filename, duration = 1795.0, transition_time = 5.0) @filename = filename @duration = duration @transition_time = transition_time end |
Instance Attribute Details
#duration ⇒ Object
Returns the value of attribute duration.
3 4 5 |
# File 'lib/gnome-wallpaper-slideshow/wallpaper.rb', line 3 def duration @duration end |
#filename ⇒ Object
Returns the value of attribute filename.
3 4 5 |
# File 'lib/gnome-wallpaper-slideshow/wallpaper.rb', line 3 def filename @filename end |
#transition_time ⇒ Object
Returns the value of attribute transition_time.
3 4 5 |
# File 'lib/gnome-wallpaper-slideshow/wallpaper.rb', line 3 def transition_time @transition_time end |
Instance Method Details
#==(other) ⇒ Object
16 17 18 |
# File 'lib/gnome-wallpaper-slideshow/wallpaper.rb', line 16 def ==(other) (self.filename == other.filename) && (self.duration == other.duration) && (self.transition_time == other.transition_time) end |