class Rubillow::Models::Chart
Base
chart class.
Attributes
height[RW]
@return [String] image height.
url[RW]
@return [String] URL to image.
width[RW]
@return [String] image width.
Public Instance Methods
to_html()
click to toggle source
Returns HTML for the chart. @return [String] chart HTML.
# File lib/rubillow/models/chart.rb, line 16 def to_html "<img src='#{@url}' height='#{@height}' width='#{width}' />" end
Protected Instance Methods
parse()
click to toggle source
@private
Calls superclass method
Rubillow::Models::Base#parse
# File lib/rubillow/models/chart.rb, line 23 def parse super return if !success? @height = @parser.xpath('//request/height').first.text.to_i @width = @parser.xpath('//request/width').first.text.to_i @url = @parser.xpath('//response/url').first.text end