Sha256: 07056d04bd7583c36979c9599656045071404eac5418d0f7113a43504596999b

Contents?: true

Size: 451 Bytes

Versions: 6

Compression:

Stored size: 451 Bytes

Contents

require 'yaml'

module Estratto
  module Layout
    class Reader
      attr_reader :file

      def initialize(file)
        @file = file
      end

      def template
        @template ||= YAML.load_file(file)
      end

      def layout
        template['layout']
      end

      def registers
        @registers ||= layout['registers']
      end

      def multiregister?
        layout.dig('multi-register') || false
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
estratto-1.0.5 lib/estratto/layout/reader.rb
estratto-1.0.4 lib/estratto/layout/reader.rb
estratto-1.0.3 lib/estratto/layout/reader.rb
estratto-1.0.2 lib/estratto/layout/reader.rb
estratto-1.0.1 lib/estratto/layout/reader.rb
estratto-1.0.0 lib/estratto/layout/reader.rb