Sha256: 54a47737a4dc5ebf11d572e3a7e14d4368c333c4fcbb7949a911dea50d4c87a7

Contents?: true

Size: 1.03 KB

Versions: 12

Compression:

Stored size: 1.03 KB

Contents

module CSL
  class Style
    
    class Names < Node
      
      attr_struct :variable, *Schema.attr(:names, :delimiter, :affixes, :display, :font)      
      
      attr_children :name, :'et-al', :label, :substitute
      
      alias labels label
      
      def initialize(attributes = {})
        super(attributes)
        children[:label] = []
        
        yield self if block_given?
      end
      
    end
    
    
    class Name < Node
    
      attr_struct :form, *Schema.attr(:name, :affixes, :font, :delimiter)

      attr_children :'name-part'

      alias parts name_part

      def initialize(attributes = {})
        super(attributes)
        children[:'name-part'] = []

        yield self if block_given?
      end
      
    end

    class NamePart < Node
      has_no_children
      attr_struct :name, :'text-case', *Schema.attr(:affixes, :font)
    end
    
    class EtAl < Node
      has_no_children
      attr_struct :term, *Schema.attr(:affixes, :font)
    end

    class Substitute < Node
    end
    
    
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
csl-1.0.0.pre13 lib/csl/style/names.rb
csl-1.0.0.pre12 lib/csl/style/names.rb
csl-1.0.0.pre11 lib/csl/style/names.rb
csl-1.0.0.pre10 lib/csl/style/names.rb
csl-1.0.0.pre9 lib/csl/style/names.rb
csl-1.0.0.pre8 lib/csl/style/names.rb
csl-1.0.0.pre7 lib/csl/style/names.rb
csl-1.0.0.pre6 lib/csl/style/names.rb
csl-1.0.0.pre5 lib/csl/style/names.rb
csl-1.0.0.pre4 lib/csl/style/names.rb
csl-1.0.0.pre3 lib/csl/style/names.rb
csl-1.0.0.pre2 lib/csl/style/names.rb