Class: RubyPager::Image_Data
- Inherits:
-
Object
- Object
- RubyPager::Image_Data
- Defined in:
- lib/ruby_pager/image_data.rb
Instance Attribute Summary collapse
-
#file_name ⇒ Object
Returns the value of attribute file_name.
-
#height ⇒ Object
Returns the value of attribute height.
-
#width ⇒ Object
Returns the value of attribute width.
Class Method Summary collapse
Instance Method Summary collapse
- #get_consolidated_data ⇒ Object
-
#initialize(ex_data) ⇒ Image_Data
constructor
A new instance of Image_Data.
Constructor Details
#initialize(ex_data) ⇒ Image_Data
Returns a new instance of Image_Data.
7 8 9 10 11 12 13 14 15 |
# File 'lib/ruby_pager/image_data.rb', line 7 def initialize(ex_data) @data=Hash.new @data["@imageFilename"]=ex_data["@imageFilename"] @data["@imageWidth"]=ex_data["@imageWidth"] @data["@imageHeight"]=ex_data["@imageHeight"] @file_name = @data["@imageFilename"] @width = @data["@imageWidth"].to_i @height = @data["@imageHeight"].to_i end |
Instance Attribute Details
#file_name ⇒ Object
Returns the value of attribute file_name.
6 7 8 |
# File 'lib/ruby_pager/image_data.rb', line 6 def file_name @file_name end |
#height ⇒ Object
Returns the value of attribute height.
6 7 8 |
# File 'lib/ruby_pager/image_data.rb', line 6 def height @height end |
#width ⇒ Object
Returns the value of attribute width.
6 7 8 |
# File 'lib/ruby_pager/image_data.rb', line 6 def width @width end |
Class Method Details
.blank_data ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/ruby_pager/image_data.rb', line 32 def self.blank_data res=Hash.new res["@imageFilename"]="" res["@imageWidth"]="0" res["@imageHeight"]="0" return res end |
Instance Method Details
#get_consolidated_data ⇒ Object
40 41 42 43 |
# File 'lib/ruby_pager/image_data.rb', line 40 def get_consolidated_data consolidate_data() return @data end |