Class: Orchparty::DSLParser
- Inherits:
-
Object
- Object
- Orchparty::DSLParser
- Defined in:
- lib/orchparty/dsl_parser.rb
Instance Attribute Summary collapse
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ DSLParser
constructor
A new instance of DSLParser.
- #parse ⇒ Object
Constructor Details
#initialize(filename) ⇒ DSLParser
Returns a new instance of DSLParser.
8 9 10 |
# File 'lib/orchparty/dsl_parser.rb', line 8 def initialize(filename) @filename = filename end |
Instance Attribute Details
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
6 7 8 |
# File 'lib/orchparty/dsl_parser.rb', line 6 def filename @filename end |
Instance Method Details
#parse ⇒ Object
12 13 14 15 16 17 |
# File 'lib/orchparty/dsl_parser.rb', line 12 def parse file_content = File.read(filename) builder = RootBuilder.new builder.instance_eval(file_content, filename) builder._build end |