Class: RelatonGb::GbStandardType
- Inherits:
-
Object
- Object
- RelatonGb::GbStandardType
- Defined in:
- lib/relaton_gb/gb_standard_type.rb
Overview
GB standard type.
Instance Attribute Summary collapse
- #mandate ⇒ String readonly
- #prefix ⇒ String readonly
- #scope ⇒ String readonly
- #topic ⇒ String readonly
Instance Method Summary collapse
-
#initialize(scope:, prefix:, mandate:, topic:) ⇒ GbStandardType
constructor
A new instance of GbStandardType.
- #to_hash ⇒ Hash
- #to_xml(builder) ⇒ Object
Constructor Details
#initialize(scope:, prefix:, mandate:, topic:) ⇒ GbStandardType
Returns a new instance of GbStandardType.
11 12 13 14 15 16 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 11 def initialize(scope:, prefix:, mandate:, topic:) @scope = scope @prefix = prefix @mandate = mandate @topic = topic end |
Instance Attribute Details
#mandate ⇒ String (readonly)
5 6 7 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 5 def mandate @mandate end |
#prefix ⇒ String (readonly)
5 6 7 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 5 def prefix @prefix end |
#scope ⇒ String (readonly)
5 6 7 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 5 def scope @scope end |
#topic ⇒ String (readonly)
5 6 7 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 5 def topic @topic end |
Instance Method Details
#to_hash ⇒ Hash
28 29 30 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 28 def to_hash { "scope" => scope, "prefix" => prefix, "mandate" => mandate, "topic" => topic } end |
#to_xml(builder) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/relaton_gb/gb_standard_type.rb', line 18 def to_xml(builder) builder.gbtype do builder.gbscope scope builder.gbprefix prefix builder.gbmandate mandate builder.gbtopic topic end end |