Sha256: f82eff30f04461e0c8bcd43996ff2c50b4923426cfd6f4d38184c7584e0267b0
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
class TokyoMetro::Factory::Decorate::Api::TrainOperation::Common < TokyoMetro::Factory::Decorate::Api::MetaClass::RealTime::Info def initialize( request , obj , railway_line , controller ) super( request , obj ) @railway_line = railway_line @controller = controller end attr_reader :railway_line attr_reader :controller attr_reader :status_type def render h.render inline: <<-HAML , type: :haml , locals: { this: self } %li{ class: [ :train_operation_info , :railway_line , :clearfix ] } = this.railway_line.decorate.render_matrix( make_link_to_railway_line: true , size: :small , link_controller_name: this.controller ) %div{ class: [ :status , this.status_type ] } %div{ class: :infos } = this.render_status_icon_and_text = this.render_status_additional_infos HAML end def render_status_icon_and_text h.render inline: <<-HAML , type: :haml , locals: { this: self } %div{ class: :icon }< = ::TokyoMetro::App::Renderer::Icon.send( this.status_type , request , 3 ).render %div{ class: :text } %p{ class: :text_ja }< = this.status_text_ja %p{ class: :text_en }< = this.status_text_en HAML 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/common.rb |