class Mineral::Mineral

Included Modules

Defined in:

Class Method Summary

Instance Method Summary

Instance methods inherited from module Hardness

data data, hardness hardness

Class Method Detail

def self.new(id : Int32, name : String, hardness : Float64, crystal_struct : String) #

Creates a mineral with given parameters


def self.new(id : Int32) #

Creates a mineral with as "rock", 0 hardness and unknown structure


Instance Method Detail

def crystal_struct : String #

def crystal_struct=(crystal_struct) #

def hardness : Float64 | Int32 #

def id : Int32 #

def kind_of_crystal : String #

Returns the crystal structure of this mineral


def name : String #

def to_s #

Prints out a description of this mineral