-
-
Save zaben903/51a942898432cc0352991ca44a2455b6 to your computer and use it in GitHub Desktop.
Ruby requires
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somename.rb | |
class Somename | |
def self.example | |
puts 'Somename example' | |
end | |
end | |
class Othername | |
def self.example | |
puts 'Othername example' | |
end | |
end | |
# mylib.rb | |
require_relative './somename' | |
Somename.example | |
Othername.example | |
# Bash | |
$ ruby ./mylib.rb | |
Somename example | |
Othername example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# somename.rb | |
class Somename | |
def self.example | |
puts 'Somename example' | |
end | |
end | |
class Somename | |
def self.example_two | |
puts 'Othername example' | |
end | |
end | |
# mylib.rb | |
require_relative './somename' | |
Somename.example | |
Somename.example_two | |
# Bash | |
$ ruby ./mylib.rb | |
Somename example | |
Othername example |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment