Class: Ecfr::Common::Hierarchy
- Inherits:
-
Object
- Object
- Ecfr::Common::Hierarchy
- Extended by:
- Extensible
- Includes:
- AttributeMethodDefinition
- Defined in:
- lib/ecfr/common/hierarchy.rb
Instance Attribute Summary collapse
-
#appendix ⇒ String
readonly
Appendix identifier.
-
#chapter ⇒ String
readonly
Chapter indentifier.
-
#paragraph ⇒ String
readonly
Paragraph citation.
-
#part ⇒ String
readonly
Part identifier.
-
#section ⇒ String
readonly
Section identifier.
-
#subchapter ⇒ String
readonly
Subchapter identifier.
-
#subject_group ⇒ String
readonly
Subject group identifier.
-
#subpart ⇒ String
readonly
Subpart identifier.
-
#subtitle ⇒ String
readonly
Subtitle identifier.
-
#title ⇒ String
readonly
Title number.
Instance Method Summary collapse
Methods included from Extensible
Methods included from AttributeMethodDefinition
Instance Attribute Details
#appendix ⇒ String (readonly)
Appendix identifier
23 24 |
# File 'lib/ecfr/common/hierarchy.rb', line 23 attribute :appendix, desc: "Appendix identifier" |
#chapter ⇒ String (readonly)
Chapter indentifier
11 12 |
# File 'lib/ecfr/common/hierarchy.rb', line 11 attribute :chapter, desc: "Chapter indentifier" |
#paragraph ⇒ String (readonly)
Paragraph citation
25 26 |
# File 'lib/ecfr/common/hierarchy.rb', line 25 attribute :paragraph, desc: "Paragraph citation" |
#part ⇒ String (readonly)
Part identifier
15 16 |
# File 'lib/ecfr/common/hierarchy.rb', line 15 attribute :part, desc: "Part identifier" |
#section ⇒ String (readonly)
Section identifier
21 22 |
# File 'lib/ecfr/common/hierarchy.rb', line 21 attribute :section, desc: "Section identifier" |
#subchapter ⇒ String (readonly)
Subchapter identifier
13 14 |
# File 'lib/ecfr/common/hierarchy.rb', line 13 attribute :subchapter, desc: "Subchapter identifier" |
#subject_group ⇒ String (readonly)
Subject group identifier
19 20 |
# File 'lib/ecfr/common/hierarchy.rb', line 19 attribute :subject_group, desc: "Subject group identifier" |
#subpart ⇒ String (readonly)
Subpart identifier
17 18 |
# File 'lib/ecfr/common/hierarchy.rb', line 17 attribute :subpart, desc: "Subpart identifier" |
#subtitle ⇒ String (readonly)
Subtitle identifier
9 10 |
# File 'lib/ecfr/common/hierarchy.rb', line 9 attribute :subtitle, desc: "Subtitle identifier" |
#title ⇒ String (readonly)
Title number
7 8 |
# File 'lib/ecfr/common/hierarchy.rb', line 7 attribute :title, desc: "Title number" |
Instance Method Details
#to_hash ⇒ Object
28 29 30 31 32 |
# File 'lib/ecfr/common/hierarchy.rb', line 28 def to_hash @attributes.each_with_object({}) { |attr, hsh| hsh[attr[0]] = attr[1] }.compact.symbolize_keys end |