This file contains hidden or 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
class Greeter | |
def initialize(who) | |
@who = who | |
end | |
def greet | |
puts "Hello, #{ @who }!" | |
end |
This file contains hidden or 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
# This is another additional file | |
class BarClass < Struct.new(:baz, :quux) | |
end |
This file contains hidden or 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
# This is a sample shard with many older versions | |
class MyShard | |
VERSION = "100" | |
end |
This file contains hidden or 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
# This gist has no shard.rb file, and so isn't a shard, even though it includes Ruby code. | |
puts "Hello, world!" |
This file contains hidden or 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
# Since this file's name is simply `shard.rb`, it qualifies as a shard file, | |
# but does not provide a descriptive name. | |
# This results in shard using the gist's id as the shard name. | |
def sound(filename) | |
puts "\play #{ filename }.rb" | |
end |