lib/vedeu/repositories/repositories/borders.rb in vedeu-0.4.15 vs lib/vedeu/repositories/repositories/borders.rb in vedeu-0.4.16
- old
+ new
@@ -3,22 +3,22 @@
# Allows the storing of interface/view borders independent of the interface
# instance.
#
class Borders < Repository
- # @return [Vedeu::Borders]
- def self.borders
- @borders ||= reset! # Vedeu::Borders.new(Vedeu::Border)
- end
+ class << self
- # @return [Vedeu::Borders]
- def self.repository
- Vedeu.borders
- end
+ # @return [Vedeu::Borders]
+ def borders
+ @borders ||= reset!
+ end
+ alias_method :repository, :borders
- # @return [Vedeu::Borders]
- def self.reset!
- @borders = Vedeu::Borders.register_repository(Vedeu::Border)
+ # @return [Vedeu::Borders]
+ def reset!
+ @borders = Vedeu::Borders.register_repository(Vedeu::Border)
+ end
+
end
# @param name [String] The name of the stored border.
# @return [Vedeu::Border|Vedeu::NullBorder]
def by_name(name)