It's common in Ruby to see some code setup a Struct
like this:
class Specialized < Struct.new(:whatever)
# ... define custom methods here...
end
Struct
supports this kind of modification using a block though, so the above could be written as:
Specialized = Struct.new(:whatever) do
# ... define custom methods here...
end
Those are the possibilities.
There's no right or wrong way to handle this.