Class: KlassTableDrop

Inherits:
Liquid::Drop
  • Object
show all
Defined in:
lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ KlassTableDrop

rubocop:disable Lint/MissingSuper



4
5
6
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 4

def initialize(klass) # rubocop:disable Lint/MissingSuper
  @klass = klass
end

Instance Method Details

#attributesObject



40
41
42
43
44
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 40

def attributes
  @klass[:general_attributes].map do |attr|
    KlassTableAttributeDrop.new(attr)
  end
end

#definitionObject



20
21
22
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 20

def definition
  @klass[:definition]
end

#generalObject



32
33
34
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 32

def general
  KlassTableGeneralDrop.new(@klass[:general]) if @klass[:general]
end

#has_general?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 36

def has_general?
  !!@klass[:general]
end

#idObject



8
9
10
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 8

def id
  @klass[:general_id]
end

#nameObject



12
13
14
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 12

def name
  @klass[:name]
end

#stereotypeObject



16
17
18
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 16

def stereotype
  @klass[:stereotype]
end

#typeObject



24
25
26
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 24

def type
  @klass[:type]
end

#upper_klassObject



28
29
30
# File 'lib/metanorma/plugin/lutaml/liquid_drops/klass_table_drop.rb', line 28

def upper_klass
  @klass[:general_upper_klass]
end