Class: TokyoMetro::App::Renderer::Icon::Image

Inherits:
Factory::Decorate::MetaClass show all
Defined in:
lib/tokyo_metro/app/renderer/icon/image.rb

Instance Method Summary collapse

Constructor Details

#initialize(request, image_filename, size, class_name: nil) ⇒ Image

Returns a new instance of Image.



3
4
5
6
7
8
# File 'lib/tokyo_metro/app/renderer/icon/image.rb', line 3

def initialize( request , image_filename , size , class_name: nil )
  super( request )
  @image_filename = image_filename
  @class_name = class_name
  @size = size
end

Instance Method Details

#renderObject



10
11
12
# File 'lib/tokyo_metro/app/renderer/icon/image.rb', line 10

def render
  h.image_tag( @image_filename , class: classes )
end