Class: Seep::Image

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/seep/image.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#imageObject (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

Returns:

  • (Boolean)


16
# File 'lib/seep/image.rb', line 16

def valid?; @valid; end