Class: Lutaml::Xsd::Spa::Svg::Config::ComponentRule

Inherits:
Object
  • Object
show all
Defined in:
lib/lutaml/xsd/spa/svg/config/component_rules.rb

Overview

Individual component rule value object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rule_hash) ⇒ ComponentRule

Returns a new instance of ComponentRule.



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 39

def initialize(rule_hash)
  @icon = rule_hash["icon"]
  @show_cardinality = rule_hash["show_cardinality"] || false
  @show_namespace = rule_hash["show_namespace"] || false
  @show_type = rule_hash["show_type"] || false
  @show_default = rule_hash["show_default"] || false
  @show_base_type = rule_hash["show_base_type"] || false
  @show_derivation = rule_hash["show_derivation"] || false
  @clickable = rule_hash["clickable"] || false
  @filter = rule_hash["filter"]
end

Instance Attribute Details

#filterObject (readonly)

Returns the value of attribute filter.



37
38
39
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 37

def filter
  @filter
end

#iconObject (readonly)

Returns the value of attribute icon.



37
38
39
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 37

def icon
  @icon
end

Instance Method Details

#clickable?Boolean

Returns:

  • (Boolean)


75
76
77
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 75

def clickable?
  @clickable
end

#show_base_type?Boolean

Returns:

  • (Boolean)


67
68
69
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 67

def show_base_type?
  @show_base_type
end

#show_cardinality?Boolean

Returns:

  • (Boolean)


51
52
53
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 51

def show_cardinality?
  @show_cardinality
end

#show_default?Boolean

Returns:

  • (Boolean)


63
64
65
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 63

def show_default?
  @show_default
end

#show_derivation?Boolean

Returns:

  • (Boolean)


71
72
73
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 71

def show_derivation?
  @show_derivation
end

#show_namespace?Boolean

Returns:

  • (Boolean)


55
56
57
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 55

def show_namespace?
  @show_namespace
end

#show_type?Boolean

Returns:

  • (Boolean)


59
60
61
# File 'lib/lutaml/xsd/spa/svg/config/component_rules.rb', line 59

def show_type?
  @show_type
end