Class: Expansion
- Inherits:
-
Object
- Object
- Expansion
- Defined in:
- lib/manasimu/expansion.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#exists ⇒ Object
Returns the value of attribute exists.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
2 3 4 |
# File 'lib/manasimu/expansion.rb', line 2 def code @code end |
#exists ⇒ Object
Returns the value of attribute exists.
2 3 4 |
# File 'lib/manasimu/expansion.rb', line 2 def exists @exists end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/manasimu/expansion.rb', line 2 def name @name end |
Class Method Details
.load ⇒ Object
4 5 6 7 8 9 |
# File 'lib/manasimu/expansion.rb', line 4 def self.load return [] if not File.exists?(File.( '../../../db/expansions', __FILE__ )) File.open(File.( '../../../db/expansions', __FILE__ ), "r") do |file| Marshal.load(file) end end |
Instance Method Details
#==(other) ⇒ Object
11 12 13 |
# File 'lib/manasimu/expansion.rb', line 11 def ==(other) self.code == other.code and self.exists end |