Class: Proteus::Facade
- Inherits:
-
Object
- Object
- Proteus::Facade
- Defined in:
- lib/Facade.rb
Instance Attribute Summary collapse
-
#class_parser ⇒ Object
Parsers.
-
#definition_helper ⇒ Object
Helpers.
-
#definition_parser ⇒ Object
Parsers.
-
#input_parser ⇒ Object
Parsers.
-
#instance_parser ⇒ Object
Parsers.
-
#path ⇒ Object
Properties.
Instance Method Summary collapse
-
#initialize ⇒ Facade
constructor
————————————————————————— Constructor —————————————————————————.
-
#parse_file(file, current_ns = []) ⇒ Object
Parses the given input file.
-
#parse_input(yaml, current_ns = []) ⇒ Object
Parses the given input YAML.
Constructor Details
#initialize ⇒ Facade
Constructor
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/Facade.rb', line 41 def initialize( ) # Instance parser @instance_parser = InstanceParser.new # Class parser @class_parser = ClassParser.new # Definition parser @definition_parser = DefinitionParser.new @definition_parser.class_parser = @class_parser # Definition helper @definition_helper = DefinitionHelper.new @definition_helper.definition_parser = @definition_parser @definition_parser.definition_helper = @definition_helper # Input parser @input_parser = InputParser.new @input_parser.instance_parser = @instance_parser @input_parser.definition_helper = @definition_helper @definition_parser.input_parser = @input_parser end |
Instance Attribute Details
#class_parser ⇒ Object
Parsers
77 78 79 |
# File 'lib/Facade.rb', line 77 def class_parser @class_parser end |
#definition_helper ⇒ Object
Helpers
81 82 83 |
# File 'lib/Facade.rb', line 81 def definition_helper @definition_helper end |
#definition_parser ⇒ Object
Parsers
77 78 79 |
# File 'lib/Facade.rb', line 77 def definition_parser @definition_parser end |
#input_parser ⇒ Object
Parsers
77 78 79 |
# File 'lib/Facade.rb', line 77 def input_parser @input_parser end |
#instance_parser ⇒ Object
Parsers
77 78 79 |
# File 'lib/Facade.rb', line 77 def instance_parser @instance_parser end |
#path ⇒ Object
Properties
84 85 86 |
# File 'lib/Facade.rb', line 84 def path @path end |
Instance Method Details
#parse_file(file, current_ns = []) ⇒ Object
Parses the given input file.
109 110 111 |
# File 'lib/Facade.rb', line 109 def parse_file( file, current_ns = [] ) return @input_parser.parse_yaml( YAML.load_file(file) ) end |
#parse_input(yaml, current_ns = []) ⇒ Object
Parses the given input YAML.
102 103 104 |
# File 'lib/Facade.rb', line 102 def parse_input( yaml, current_ns = [] ) return @input_parser.parse_yaml( yaml ) end |