Sha256: 1b33629680cb32bd6f9418892948d382bf10ee84a8ab874a883035e60d7089f3

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

module ExampleUnit
  include Nyanko::Unit

  shared(:shared) do |args|
    "shared #{args}"
  end

  scope(:controller) do
    function(:test) do
      "test"
    end

    function(:foo) do
      "foo"
    end

    function(:bar) do
      "bar"
    end

    function(:alias) do
      "alias"
    end

    function(:default) do
      run_default
    end
  end

  scope(:view) do
    function(:test) do
      "test"
    end

    function(:self) do
      self
    end

    function(:locals) do
      key
    end

    function(:shared) do
      shared("args")
    end

    function(:error) do
      raise_no_method_error
    end

    function(:helper) do
      unit.helper
    end
  end

  helpers do
    def helper
      "helper"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nyanko-0.0.7 spec/fixtures/units/example_unit/example_unit.rb
nyanko-0.0.6 spec/fixtures/units/example_unit/example_unit.rb
nyanko-0.0.5 spec/fixtures/units/example_unit/example_unit.rb