Class: Pdadv::Entities::ImageEntity

Inherits:
Object
  • Object
show all
Defined in:
lib/pdadv/entities/image_entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#heightObject (readonly)

Returns the value of attribute height.



13
14
15
# File 'lib/pdadv/entities/image_entity.rb', line 13

def height
  @height
end

#pathObject (readonly)

Returns the value of attribute path.



13
14
15
# File 'lib/pdadv/entities/image_entity.rb', line 13

def path
  @path
end

#widthObject (readonly)

Returns the value of attribute width.



13
14
15
# File 'lib/pdadv/entities/image_entity.rb', line 13

def width
  @width
end

#xObject (readonly)

Returns the value of attribute x.



13
14
15
# File 'lib/pdadv/entities/image_entity.rb', line 13

def x
  @x
end

#yObject (readonly)

Returns the value of attribute y.



13
14
15
# File 'lib/pdadv/entities/image_entity.rb', line 13

def y
  @y
end