Sha256: c0d5af66f5f98ac511e68b57e8f5ae1819516f47b2744a7b127c53d5effdedce
Contents?: true
Size: 496 Bytes
Versions: 1
Compression:
Stored size: 496 Bytes
Contents
class TokyoMetro::App::Renderer::Icon::Image < TokyoMetro::Factory::Decorate::MetaClass def initialize( request , image_filename , size , class_name: nil ) super( request ) @image_filename = image_filename @class_name = class_name @size = size end def render h.image_tag( @image_filename , class: classes ) end private def classes ary = [] if @class_name.present? ary << @class_name end ary << "icon_img_#{ @size }x" ary end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tokyo_metro-0.10.1 | lib/tokyo_metro/app/renderer/icon/image.rb |