Class: Smagacor::GameInfo

Inherits:
Object show all
Defined in:
lib/smagacor/util.rb

Constant Summary collapse

Domain =
'thomasleitner,2004'
Name =
'gameinfo'

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category.



61
62
63
# File 'lib/smagacor/util.rb', line 61

def category
  @category
end

#classnameObject (readonly)

Returns the value of attribute classname.



60
61
62
# File 'lib/smagacor/util.rb', line 60

def classname
  @classname
end

#descriptionObject (readonly)

Returns the value of attribute description.



57
58
59
# File 'lib/smagacor/util.rb', line 57

def description
  @description
end

#directoryObject

Returns the value of attribute directory.



59
60
61
# File 'lib/smagacor/util.rb', line 59

def directory
  @directory
end

#fileObject (readonly)

Returns the value of attribute file.



58
59
60
# File 'lib/smagacor/util.rb', line 58

def file
  @file
end

#iconObject (readonly)

Returns the value of attribute icon.



56
57
58
# File 'lib/smagacor/util.rb', line 56

def icon
  @icon
end

#nameObject (readonly)

Returns the value of attribute name.



55
56
57
# File 'lib/smagacor/util.rb', line 55

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



67
68
69
70
71
72
73
74
75
# File 'lib/smagacor/util.rb', line 67

def ==( other )
  @name == other.name && \
  @icon == other.icon && \
  @description == other.description && \
  @file == other.file && \
  @directory == other.directory && \
  @classname == other.classname && \
  @category == other.category
end

#interface_classObject



63
64
65
# File 'lib/smagacor/util.rb', line 63

def interface_class
  @classname.split( /::/ ).inject( Object ) {|mod, name| mod.const_get( name )}
end

#to_yaml_typeObject



79
80
81
# File 'lib/smagacor/util.rb', line 79

def to_yaml_type
  "!#{Domain}/#{Name}"
end