Commit c11e5b10 authored by Takayuki Kamiyama's avatar Takayuki Kamiyama 🐉

Update, move change.

parent fb574c4d
......@@ -146,48 +146,41 @@ module Zinbeijett
end
end
# Super class
class Engine
include Zinbeijett
def self.main
v = /\Aversion\z/
ve = /\A[-][v]\z/
h = /\A[-][l]\z/
he = /\Alicense\z/
s = /\Astart\z/
so = /\A[-][s]\z/
co = /\A[-][h]\z/
com = /\Ahelp\z/
one = ARGV[0]
if one.nil?
soft
elsif one.match?(v)
version
elsif one.match?(ve)
version
elsif one.match?(he)
licen
elsif one.match?(h)
licen
elsif one.match?(s)
start
elsif one.match?(so)
start
elsif one.match?(co)
help
elsif one.match?(com)
help
else
puts 'Please choose an option.'.toutf8
end
end
include Zinbeijett
v = /\Aversion\z/
ve = /\A[-][v]\z/
h = /\A[-][l]\z/
he = /\Alicense\z/
s = /\Astart\z/
so = /\A[-][s]\z/
co = /\A[-][h]\z/
com = /\Ahelp\z/
one = ARGV[0]
if one.nil?
soft
elsif one.match?(v)
version
elsif one.match?(ve)
version
elsif one.match?(he)
licen
elsif one.match?(h)
licen
elsif one.match?(s)
start
elsif one.match?(so)
start
elsif one.match?(co)
help
elsif one.match?(com)
help
else
puts 'Please choose an option.'.toutf8
end
Engine.main
GC.start
__END__
......
......@@ -14,32 +14,27 @@ module Engine
def search_txt
require_relative 'prop/all'
include All
search
All.search
end
def search_txi
require_relative 'prop/and'
include And
search
And.search
end
def search_txe
require_relative 'prop/not'
include Not
search
Not.search
end
def search_txs
require_relative 'prop/or'
include Or
search
Or.search
end
def search_gc
require_relative 'prop/gc'
include Star
search
Star.search
end
def search_druby_erb
......@@ -48,58 +43,49 @@ module Engine
def search_mail
require_relative 'prop/mail'
include Mail
search
Mail.search
end
def count_search
require_relative 'prop/count'
include Count
search
Count.search
end
end
# Super Class
class Wing
include Engine
def self.right
one = ARGV[0]
z = /\A[-][z]\z/
a = /\A[-][a]\z/
n = /\A[-][n]\z/
o = /\A[-][o]\z/
d = /\A[-][d]\z/
g = /\A[-][g]\z/
m = /\A[-][m]\z/
c = /\A[-][c]\z/
if one.nil?
puts 'engine is Zinbeijett, I made in 2016.'.toutf8.freeze
elsif one.match?(z)
search_txt
elsif one.match?(a)
search_txi
elsif one.match?(n)
search_txe
elsif one.match?(o)
search_txs
elsif one.match?(g)
search_gc
elsif one.match?(m)
search_mail
elsif one.match?(d)
search_druby_erb
elsif one.match?(c)
count_search
else
puts 'Not other arguments!'.toutf8.freeze
end
end
include Engine
one = ARGV[0]
z = /\A[-][z]\z/
a = /\A[-][a]\z/
n = /\A[-][n]\z/
o = /\A[-][o]\z/
d = /\A[-][d]\z/
g = /\A[-][g]\z/
m = /\A[-][m]\z/
c = /\A[-][c]\z/
if one.nil?
puts 'engine is Zinbeijett, I made in 2016.'.toutf8.freeze
elsif one.match?(z)
search_txt
elsif one.match?(a)
search_txi
elsif one.match?(n)
search_txe
elsif one.match?(o)
search_txs
elsif one.match?(g)
search_gc
elsif one.match?(m)
search_mail
elsif one.match?(d)
search_druby_erb
elsif one.match?(c)
count_search
else
puts 'Not other arguments!'.toutf8.freeze
end
Wing.right
GC.start
__END__
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment