module calls from another one

This commit is contained in:
Nimble 2023-01-29 17:21:25 -06:00
parent c392ab8faa
commit 93ac7be198
2 changed files with 16 additions and 5 deletions

View file

@ -1,8 +1,18 @@
# TODO: Write documentation for `Playper`
include Reader_Input
# Should have almost no info, its used as a meta class for building the program like java main void etc. by shards build
# require marks what is needed to be built
# This is designed to initialize everything
# Reference for modules https://crystal-lang.org/reference/1.7/syntax_and_semantics/modules.html
require "./tryerror/*"
require "./reader_input.cr"
module Playper
include ReaderInput
VERSION = "0.1.0"
# TODO: Put your code here
print("Hello world")
print("Hello world!")
ReaderInput.cli_input #runs cli_input from ReaderInput
end

View file

@ -8,7 +8,9 @@ require "colorize"
# Directware if used as CLI tool
# Should read
module Reader_Input
module ReaderInput
extend self
def cli_input
#switch()
puts "Welcome to The Beatles Sing-Along version 1.0!"
@ -24,7 +26,6 @@ module Reader_Input
lyrics = user_input.presence || default_lyrics
#puts "The Beatles are singing: #{"🎵#{lyrics}🎶🎸🥁".colorize.mode(:blink)}"
puts "The Beatles are singing: #{"🎵#{lyrics}🎶🎸🥁".colorize.mode(:blink)}"
end
end