Sha256: bb2489d52692b7a64a85d2495fdf813906a1b2743d12fd76a73740fe6c177ffc

Contents?: true

Size: 382 Bytes

Versions: 12

Compression:

Stored size: 382 Bytes

Contents

module Orthor
  module MetaData
    [ :keywords, :description ].each do |sym|
      class_eval %{
        def #{sym}(*val)
          if val.empty?
            if @#{sym}.nil?
              Orthor::Site.#{sym}
            else
              @#{sym}
            end
          else
            @#{sym} = val.size == 1 ? val[0] : val
          end
        end
      }
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
orthorings-0.4.2 lib/orthor/meta_data.rb
orthorings-0.4.1 lib/orthor/meta_data.rb
orthorings-0.4.0 lib/orthor/meta_data.rb
orthorings-0.3.1 lib/orthor/meta_data.rb
orthorings-0.3.0 lib/orthor/meta_data.rb
orthorings-0.2.0 lib/orthor/meta_data.rb
orthorings-0.1.5 lib/orthor/meta_data.rb
orthorings-0.1.4 lib/orthor/meta_data.rb
orthorings-0.1.3 lib/orthor/meta_data.rb
orthorings-0.1.2 lib/orthor/meta_data.rb
orthorings-0.1.1 lib/orthor/meta_data.rb
orthorings-0.1.0 lib/orthor/meta_data.rb