Class: Smagacor::GameInfo

Inherits:
Object show all
Defined in:
lib/smagacor/controller.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.



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

def category
  @category
end

#classnameObject (readonly)

Returns the value of attribute classname.



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

def classname
  @classname
end

#descriptionObject (readonly)

Returns the value of attribute description.



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

def description
  @description
end

#directoryObject

Returns the value of attribute directory.



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

def directory
  @directory
end

#fileObject (readonly)

Returns the value of attribute file.



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

def file
  @file
end

#iconObject (readonly)

Returns the value of attribute icon.



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

def icon
  @icon
end

#nameObject (readonly)

Returns the value of attribute name.



54
55
56
# File 'lib/smagacor/controller.rb', line 54

def name
  @name
end

Instance Method Details

#==(other) ⇒ Object



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

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

#get_class_objectObject



62
63
64
# File 'lib/smagacor/controller.rb', line 62

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

#to_yaml_typeObject



78
79
80
# File 'lib/smagacor/controller.rb', line 78

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