Class: BasicBlock::Alignment
- Inherits:
-
Object
- Object
- BasicBlock::Alignment
- Defined in:
- lib/relaton_iec/basic_block/alignment.rb
Constant Summary collapse
- ALIGNS =
%w[left right center justified].freeze
Instance Method Summary collapse
-
#initialize(content) ⇒ Alignment
constructor
A new instance of Alignment.
- #inspect ⇒ String
- #to_s ⇒ String
Constructor Details
#initialize(content) ⇒ Alignment
Returns a new instance of Alignment.
8 9 10 11 12 13 |
# File 'lib/relaton_iec/basic_block/alignment.rb', line 8 def initialize(content) unless ALIGNS.include?(content) Util.warn "invalid alignment `#{content}`\nalloved aligments are: `#{ALIGNS.join '`, `'}`" end @content = content end |
Instance Method Details
#inspect ⇒ String
25 26 27 |
# File 'lib/relaton_iec/basic_block/alignment.rb', line 25 def inspect to_s end |
#to_s ⇒ String
18 19 20 |
# File 'lib/relaton_iec/basic_block/alignment.rb', line 18 def to_s @content end |