Sha256: b03270b57f56d9b97c142ee1ae2de53575ab7330113fc925d1fd874c6cd3cacc

Contents?: true

Size: 442 Bytes

Versions: 4

Compression:

Stored size: 442 Bytes

Contents

module Monolens
  class File
    include Lens

    signature(Type::Any, Type::Any, {
      version: [Type::Any, true],
      macros: [Type::Map.of(Type::Name, Type::Any), false],
      lenses: [Type::Lenses, true],
      examples: [Type::Array.of(Type::Map.of(Type::Name, Type::Any)), false],
    })

    def call(arg, world = {})
      option(:lenses).call(arg, world)
    end

    def examples
      option(:examples, [])
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
monolens-0.6.4 lib/monolens/file.rb
monolens-0.6.3 lib/monolens/file.rb
monolens-0.6.2 lib/monolens/file.rb
monolens-0.6.1 lib/monolens/file.rb