Class: Reader
- Inherits:
-
Object
- Object
- Reader
- Defined in:
- lib/xlsx_to_k8s_network_policy.rb
Overview
Reads an XLSX file and creates the NetworkPolicy
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(file) ⇒ Reader
constructor
A new instance of Reader.
- #read ⇒ Object
Constructor Details
#initialize(file) ⇒ Reader
Returns a new instance of Reader.
291 292 293 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 291 def initialize(file) @file = file end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
285 286 287 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 285 def file @file end |
Class Method Details
Instance Method Details
#read ⇒ Object
295 296 297 298 299 300 301 |
# File 'lib/xlsx_to_k8s_network_policy.rb', line 295 def read @xlsx = Roo::Spreadsheet.open('./test/fixtures/network_policy.xlsx') @network_policy = NetworkPolicies.new read_zones read_rules @network_policy end |