Sha256: 16957df4340d0a8e8e9a7da6532b6dfc0055d32388c49b198fdf46884e793985

Contents?: true

Size: 615 Bytes

Versions: 2

Compression:

Stored size: 615 Bytes

Contents

# -*- coding: utf-8 -*-
module ApplicationHelper
  def modal_css_class
    "modal hide#{raspberrypi? ? '' : ' fade'}"
  end

  # Blocklyのメッセージのlocaleの名前を返す
  #
  # Blocklyではenがen_usであるため
  def blockly_message_locale_name
    if I18n.locale.to_s == 'en'
      'en_us'
    else
      I18n.locale
    end
  end

  # name of Toolbox
  def toolbox_name
    SmalrubyEditor::Config.toolbox_name || 'default'
  end

  # css name of Toolbox
  def toolbox_css_name
    SmalrubyEditor::Config.toolbox_css_name ||
      SmalrubyEditor::Config.toolbox_name ||
      'default'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
smalruby-editor-0.2.2-x86-mingw32 app/helpers/application_helper.rb
smalruby-editor-0.2.2 app/helpers/application_helper.rb