Class: PhotoscanOutputs::Resolution
- Inherits:
-
Object
- Object
- PhotoscanOutputs::Resolution
- Defined in:
- lib/photoscan_outputs/camera.rb
Instance Attribute Summary collapse
-
#h ⇒ Object
(also: #height)
readonly
Returns the value of attribute h.
-
#w ⇒ Object
(also: #width)
readonly
Returns the value of attribute w.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(w, h) ⇒ Resolution
constructor
A new instance of Resolution.
Constructor Details
#initialize(w, h) ⇒ Resolution
Returns a new instance of Resolution.
45 46 47 48 |
# File 'lib/photoscan_outputs/camera.rb', line 45 def initialize( w, h ) @w = w @h = h end |
Instance Attribute Details
#h ⇒ Object (readonly) Also known as: height
Returns the value of attribute h.
41 42 43 |
# File 'lib/photoscan_outputs/camera.rb', line 41 def h @h end |
#w ⇒ Object (readonly) Also known as: width
Returns the value of attribute w.
41 42 43 |
# File 'lib/photoscan_outputs/camera.rb', line 41 def w @w end |
Class Method Details
.from_xml(xml) ⇒ Object
50 51 52 53 54 |
# File 'lib/photoscan_outputs/camera.rb', line 50 def self.from_xml( xml ) w = xml.width h = xml.height Resolution.new( w, h ) end |