Class: PlcUtil::SdfFile
- Inherits:
-
Object
- Object
- PlcUtil::SdfFile
- Defined in:
- lib/plcutil/siemens/sdffile.rb
Instance Attribute Summary collapse
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(filename = nil) ⇒ SdfFile
constructor
A new instance of SdfFile.
Constructor Details
#initialize(filename = nil) ⇒ SdfFile
Returns a new instance of SdfFile.
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/plcutil/siemens/sdffile.rb', line 9 def initialize(filename = nil) @tags = [] case filename when '--' parse $stdin when nil # dont read file else File.open filename do |f| parse f end end end |
Instance Attribute Details
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
7 8 9 |
# File 'lib/plcutil/siemens/sdffile.rb', line 7 def @tags end |