Class: Seep::Image
Instance Attribute Summary collapse
-
#image ⇒ Object
readonly
Returns the value of attribute image.
Instance Method Summary collapse
-
#initialize(data) ⇒ Image
constructor
A new instance of Image.
- #valid? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Image
Returns a new instance of Image.
8 9 10 11 12 13 14 |
# File 'lib/seep/image.rb', line 8 def initialize(data) @valid = begin @image = GD2::Image.load( data ); true rescue false end end |
Instance Attribute Details
#image ⇒ Object (readonly)
Returns the value of attribute image.
4 5 6 |
# File 'lib/seep/image.rb', line 4 def image @image end |
Instance Method Details
#valid? ⇒ Boolean
16 |
# File 'lib/seep/image.rb', line 16 def valid?; @valid; end |