Class: ImageInfo::Parser
- Inherits:
-
Object
- Object
- ImageInfo::Parser
- Defined in:
- lib/image_info/parser.rb
Instance Attribute Summary collapse
-
#bytes ⇒ Object
readonly
Returns the value of attribute bytes.
-
#image ⇒ Object
readonly
Returns the value of attribute image.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(image, data) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(image, data) ⇒ Parser
Returns a new instance of Parser.
8 9 10 11 12 |
# File 'lib/image_info/parser.rb', line 8 def initialize(image, data) @image = image @bytes = data.bytes @parser = ::ImageSize.new(data) end |
Instance Attribute Details
#bytes ⇒ Object (readonly)
Returns the value of attribute bytes.
6 7 8 |
# File 'lib/image_info/parser.rb', line 6 def bytes @bytes end |
#image ⇒ Object (readonly)
Returns the value of attribute image.
6 7 8 |
# File 'lib/image_info/parser.rb', line 6 def image @image end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
6 7 8 |
# File 'lib/image_info/parser.rb', line 6 def parser @parser end |
Instance Method Details
#call ⇒ Object
14 15 16 17 |
# File 'lib/image_info/parser.rb', line 14 def call set_image_size set_image_type end |