Class: Stupidedi::Reader::SegmentDict::Constants
- Defined in:
- lib/stupidedi/reader/segment_dict.rb
Instance Method Summary collapse
- #at(segment_id) ⇒ Object
- #defined_at?(segment_id) ⇒ Boolean
-
#initialize(namespace) ⇒ Constants
constructor
A new instance of Constants.
- #pretty_print(q) ⇒ void
Constructor Details
Instance Method Details
#at(segment_id) ⇒ Object
138 139 140 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 138 def at(segment_id) @namespace.const_get(segment_id) end |
#defined_at?(segment_id) ⇒ Boolean
142 143 144 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 142 def defined_at?(segment_id) @constants.include?(segment_id.to_sym) end |
#pretty_print(q) ⇒ void
This method returns an undefined value.
147 148 149 |
# File 'lib/stupidedi/reader/segment_dict.rb', line 147 def pretty_print(q) q.text("#{@namespace.name}.constants") end |