Sha256: b1208b617d0e56d81a7043c937250874acf2248854b25ab74fe22b0e5366649a

Contents?: true

Size: 1.23 KB

Versions: 18

Compression:

Stored size: 1.23 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::Null
      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|
    border = Vedeu.borders.by_name(name)
    border.caption = caption
    border.store { Vedeu.trigger(:_refresh_border_, name) }
  end

  # See {file:docs/borders.md#label-3A_set_border_title_}
  Vedeu.bind(:_set_border_title_) do |name, title|
    border = Vedeu.borders.by_name(name)
    border.title = title
    border.store { Vedeu.trigger(:_refresh_border_, name) }
  end

  # :nocov:

end # Vedeu

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
vedeu-0.6.59 lib/vedeu/borders/repository.rb
vedeu-0.6.58 lib/vedeu/borders/repository.rb
vedeu-0.6.57 lib/vedeu/borders/repository.rb
vedeu-0.6.56 lib/vedeu/borders/repository.rb
vedeu-0.6.54 lib/vedeu/borders/repository.rb
vedeu-0.6.53 lib/vedeu/borders/repository.rb
vedeu-0.6.52 lib/vedeu/borders/repository.rb
vedeu-0.6.51 lib/vedeu/borders/repository.rb
vedeu-0.6.50 lib/vedeu/borders/repository.rb
vedeu-0.6.49 lib/vedeu/borders/repository.rb
vedeu-0.6.48 lib/vedeu/borders/repository.rb
vedeu-0.6.47 lib/vedeu/borders/repository.rb
vedeu-0.6.46 lib/vedeu/borders/repository.rb
vedeu-0.6.45 lib/vedeu/borders/repository.rb
vedeu-0.6.44 lib/vedeu/borders/repository.rb
vedeu-0.6.43 lib/vedeu/borders/repository.rb
vedeu-0.6.42 lib/vedeu/borders/repository.rb
vedeu-0.6.41 lib/vedeu/borders/repository.rb