Sha256: f87c8b1ee53ee96db4c58c8a91fd2bba791b15733bf3e8cec42ff8e4a35d5299

Contents?: true

Size: 1.12 KB

Versions: 5

Compression:

Stored size: 1.12 KB

Contents

module Vedeu

  module Borders

    # Allows the storing of interface/view borders independent of the
    # interface instance.
    #
    class Repository < Vedeu::Repositories::Repository

      singleton_class.send(:alias_method, :borders, :repository)

      null Vedeu::Borders::Border, enabled: false
      real Vedeu::Borders::Border

    end # Repository

  end # Borders

  # Manipulate the repository of borders.
  #
  # @example
  #   Vedeu.borders
  #
  # @!method borders
  # @return [Vedeu::Borders::Repository]
  def_delegators Vedeu::Borders::Repository,
                 :borders

  # :nocov:

  # See {file:docs/borders.md#label-3A_refresh_border_}
  Vedeu.bind(:_refresh_border_) do |name|
    Vedeu::Borders::Refresh.by_name(name)
  end

  # See {file:docs/borders.md#label-3A_set_border_caption_}
  Vedeu.bind(:_set_border_caption_) do |name, caption|
    Vedeu::Borders::SetAttribute.update(name, :title, caption)
  end

  # See {file:docs/borders.md#label-3A_set_border_title_}
  Vedeu.bind(:_set_border_title_) do |name, title|
    Vedeu::Borders::SetAttribute.update(name, :caption, title)
  end

  # :nocov:

end # Vedeu

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vedeu-0.7.2 lib/vedeu/borders/repository.rb
vedeu-0.7.1 lib/vedeu/borders/repository.rb
vedeu-0.7.0 lib/vedeu/borders/repository.rb
vedeu-0.6.71 lib/vedeu/borders/repository.rb
vedeu-0.6.70 lib/vedeu/borders/repository.rb