Sha256: 378136af475a85cf9bbbd7e7d5df8d911415a1738b83b12d90dd6b603b823f91

Contents?: true

Size: 1004 Bytes

Versions: 1

Compression:

Stored size: 1004 Bytes

Contents

class TokyoMetro::Factory::Decorate::Api::TrainOperation::Info::BasicError < TokyoMetro::Factory::Decorate::Api::TrainOperation::Common

  def initialize( request , obj , railway_line , controller )
    super( request , obj , railway_line , controller )
    @status_type = :network_error
  end

  def status_text_ja
    "情報取得 失敗"
  end

  def status_text_en
    "Fail to load information"
  end

  def render_status_additional_infos
    h.render inline: <<-HAML , type: :haml , locals: h_locals_for_status_additional_infos
%div{ class: :additional_infos }<
  %div{ class: :text_ja }
    %p{ class: :abstruct }<
      = text_ja_abstruct
    %p{ class: :precise }<
      = text_ja_precise
  %div{ class: :text_en }
    %p{ class: :abstruct }<
      = text_en_abstruct
    %p{ class: :precise }<
      = text_en_precise
    HAML
  end

  private

  def h_locals_for_status_additional_infos
    raise "This method \'#{ __method__ }\' is not defined in this class \'#{ self.class }\'."
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokyo_metro-0.10.1 lib/tokyo_metro/factory/decorate/api/train_operation/info/basic_error.rb