Sha256: 957946c34fe4690f6bbbe8ff264d5d593f201c3f2b34e5739570ccbd41d8609f

Contents?: true

Size: 544 Bytes

Versions: 1

Compression:

Stored size: 544 Bytes

Contents

class TokyoMetro::App::Renderer::Concerns::Header::Title::Base < TokyoMetro::App::Renderer::Concerns::Header::Title::MetaClass

  def render
    h.render inline: <<-HAML , type: :haml , locals: h_locals
%div{ class: domain_class_name }
  %h1{ class: h1_class_name }<
    = text_ja
  %h2{ class: :text_en }<
    = text_en
    HAML
  end

  private

  def h_locals
    super.merge({
      h1_class_name: h1_class_name
    })
  end

  def h1_class_name
    if /\A[a-zA-Z ]+\Z/ =~ @text_ja
      :text_en
    else
      :text_ja
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/app/renderer/concerns/header/title/base.rb