Class: MicroMagick::IdentifyParser
- Inherits:
- 
      Object
      
        - Object
- MicroMagick::IdentifyParser
 
- Defined in:
- lib/micro_magick/identify_parser.rb
Constant Summary collapse
- DIMENSIONS_RE =
- /(\d+)x(\d+)/
Instance Attribute Summary collapse
- 
  
    
      #height  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute height. 
- 
  
    
      #width  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute width. 
Instance Method Summary collapse
- 
  
    
      #initialize(stdout)  ⇒ IdentifyParser 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of IdentifyParser. 
Constructor Details
#initialize(stdout) ⇒ IdentifyParser
Returns a new instance of IdentifyParser.
| 7 8 9 10 11 | # File 'lib/micro_magick/identify_parser.rb', line 7 def initialize(stdout) if (m = stdout.match(DIMENSIONS_RE)) @width, @height = m[1].to_i, m[2].to_i end end | 
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
| 6 7 8 | # File 'lib/micro_magick/identify_parser.rb', line 6 def height @height end | 
#width ⇒ Object (readonly)
Returns the value of attribute width.
| 6 7 8 | # File 'lib/micro_magick/identify_parser.rb', line 6 def width @width end |