0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

乃木坂46の現役一期生メンバーでアンダー経験のないメンバーをSinatraフレークワークを使ってWebページで表示する

Posted at

Sinatraフレームワークを使って乃木坂46の現役一期生メンバーでアンダー経験のないメンバーのWebページを作りました。ソースコードはこちらです。

# erbでWebページを表示しよう
require 'sinatra'
require 'sinatra/reloader'
require 'erb'

get '/' do
#    @name = "Sinatra"
#    @now = Time.now
    @member = ["松村沙友理","秋元真夏","高山一実","生田絵梨花"]
    erb :index
end

__END__
@@index
<!DOCTYPE html>
<html lang="ja">
    <head>
        <mata charset="utf-8">
        <title>Sinatra - paiza</title>
        <style>body {padding: 30px;}</style>
    </head>
    <body>
        <h1>乃木坂46</h1>
        <h2>乃木坂46一期生でアンダー経験ない現役メンバー</h2>
        <% @member.each do |person| %>
            <p><%= "#{person}選抜メンバーから落ちたことがない" %></p>
        <% end %>    
    </body>
</html>

RubyでSinatraフレームワークを使ってWebアプリケーションを作ってみました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?