Class: Pdadv::Entities::ImageEntity
- Inherits:
-
Object
- Object
- Pdadv::Entities::ImageEntity
- Defined in:
- lib/pdadv/entities/image_entity.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ ImageEntity
constructor
A new instance of ImageEntity.
Constructor Details
#initialize(params = {}) ⇒ ImageEntity
Returns a new instance of ImageEntity.
6 7 8 9 10 11 12 |
# File 'lib/pdadv/entities/image_entity.rb', line 6 def initialize(params = {}) @path = params[:path].to_s @x = params[:x].to_i @y = params[:y].to_i @width = params[:width].to_i @height = params[:height].to_i end |
Instance Attribute Details
#height ⇒ Object (readonly)
Returns the value of attribute height.
13 14 15 |
# File 'lib/pdadv/entities/image_entity.rb', line 13 def height @height end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
13 14 15 |
# File 'lib/pdadv/entities/image_entity.rb', line 13 def path @path end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
13 14 15 |
# File 'lib/pdadv/entities/image_entity.rb', line 13 def width @width end |
#x ⇒ Object (readonly)
Returns the value of attribute x.
13 14 15 |
# File 'lib/pdadv/entities/image_entity.rb', line 13 def x @x end |
#y ⇒ Object (readonly)
Returns the value of attribute y.
13 14 15 |
# File 'lib/pdadv/entities/image_entity.rb', line 13 def y @y end |