Sha256: 4a046c378da7ad1b83304ad84c4d630e14910a3144ad4ab9208e3116d177f51a

Contents?: true

Size: 857 Bytes

Versions: 1

Compression:

Stored size: 857 Bytes

Contents

class Shoes
  module Mock
    class TextBlock
      include Shoes::Mock::CommonMethods
      include Shoes::Mock::Clickable

      def initialize(dsl, opts = nil)
        @dsl = dsl
        @opts = opts
      end

      def redraw(*opts); end

      def replace(*opts)
      end

      def remove;end

      # A very imperfect implementation, but at least it takes up about a line.
      # Needed to spec scrolling behavior
      def contents_alignment(current_position)
        @dsl.absolute_top = current_position.y + (@dsl.size || 12)
      end

      def adjust_current_position(*args);end
    end

    class Banner < TextBlock; end
    class Title < TextBlock; end
    class Subtitle < TextBlock; end
    class Tagline < TextBlock; end
    class Caption < TextBlock; end
    class Para < TextBlock; end
    class Inscription < TextBlock; end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-dsl-4.0.0.pre2 lib/shoes/mock/text_block.rb