class SlideHero::Image

Attributes

alt_text[R]
height[R]
location[R]
width[R]

Public Class Methods

new(location, alt_text="", width:nil, height:nil) click to toggle source
# File lib/slide_hero/image.rb, line 5
def initialize(location, alt_text="", width:nil, height:nil)
  @location = location
  @alt_text = alt_text
  @width = width
  @height = height
end

Public Instance Methods

height_attribute() click to toggle source
# File lib/slide_hero/image.rb, line 12
def height_attribute
  %{ height="#{height}"} if height
end
width_attribute() click to toggle source
# File lib/slide_hero/image.rb, line 16
def width_attribute
  %{ width="#{width}"} if width
end