Class: GtkGimdb::MovieBox
- Inherits:
-
Gtk::VBox
- Object
- Gtk::VBox
- GtkGimdb::MovieBox
- Includes:
- GetText
- Defined in:
- lib/gimdb/movie_box.rb
Defined Under Namespace
Classes: UserCheckButton
Instance Attribute Summary (collapse)
-
- (Object) movie
readonly
Returns the value of attribute movie.
Instance Method Summary (collapse)
- - (Boolean) has_poster?
-
- (MovieBox) initialize(movie, users = [])
constructor
A new instance of MovieBox.
- - (Object) set_poster
Constructor Details
- (MovieBox) initialize(movie, users = [])
A new instance of MovieBox
8 9 10 11 12 13 14 15 |
# File 'lib/gimdb/movie_box.rb', line 8 def initialize(movie, users = []) bindtextdomain($DOMAIN, $LOCALEDIR, nil, 'UTF-8') super() @movie = movie @users = users setting_up self.show_all end |
Instance Attribute Details
- (Object) movie (readonly)
Returns the value of attribute movie
5 6 7 |
# File 'lib/gimdb/movie_box.rb', line 5 def movie @movie end |
Instance Method Details
- (Boolean) has_poster?
17 18 19 |
# File 'lib/gimdb/movie_box.rb', line 17 def has_poster? @movie.image_path && File.exist?(@movie.image_path) end |
- (Object) set_poster
21 22 23 |
# File 'lib/gimdb/movie_box.rb', line 21 def set_poster @img.file = @movie.image_path if has_poster? end |