Sha256: f73da443f0825fc073282fb9e22c30fece76fd1fd93097f594e0afa5a863fad8

Contents?: true

Size: 350 Bytes

Versions: 19

Compression:

Stored size: 350 Bytes

Contents

module Finitio
  module Syntax
    module Metadata
      include Node

      capture :description

      def value
        if description
          { description: description.to_str.strip }
        else
          Hash[captures[:metadata_attr].map(&:value)]
        end
      end

    end # module Metadata
  end # module Syntax
end # module Metadata

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
finitio-0.12.0 lib/finitio/syntax/type/metadata.rb
finitio-0.11.4 lib/finitio/syntax/type/metadata.rb
finitio-0.11.3 lib/finitio/syntax/type/metadata.rb
finitio-0.11.2 lib/finitio/syntax/type/metadata.rb
finitio-0.11.1 lib/finitio/syntax/type/metadata.rb
finitio-0.10.0 lib/finitio/syntax/type/metadata.rb
finitio-0.9.1 lib/finitio/syntax/type/metadata.rb
finitio-0.9.0 lib/finitio/syntax/type/metadata.rb
finitio-0.8.0 lib/finitio/syntax/type/metadata.rb
finitio-0.7.0 lib/finitio/syntax/type/metadata.rb
finitio-0.7.0.pre.rc4 lib/finitio/syntax/type/metadata.rb
finitio-0.7.0.pre.rc3 lib/finitio/syntax/type/metadata.rb
finitio-0.7.0.pre.rc2 lib/finitio/syntax/type/metadata.rb
finitio-0.7.0.pre.rc1 lib/finitio/syntax/type/metadata.rb
finitio-0.6.1 lib/finitio/syntax/type/metadata.rb
finitio-0.6.0 lib/finitio/syntax/type/metadata.rb
finitio-0.5.2 lib/finitio/syntax/type/metadata.rb
finitio-0.5.1 lib/finitio/syntax/type/metadata.rb
finitio-0.5.0 lib/finitio/syntax/type/metadata.rb