Class: ErYamlModel
- Inherits:
-
Object
- Object
- ErYamlModel
- Defined in:
- lib/yaml2erd/er_yaml_model.rb
Instance Method Summary collapse
- #columns ⇒ Object
- #description ⇒ Object
- #group_name ⇒ Object
-
#initialize(yaml_model) ⇒ ErYamlModel
constructor
A new instance of ErYamlModel.
- #parsed_columns ⇒ Object
- #relations ⇒ Object
Constructor Details
#initialize(yaml_model) ⇒ ErYamlModel
Returns a new instance of ErYamlModel.
2 3 4 5 6 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 2 def initialize(yaml_model) @yaml_model = yaml_model parse_columns end |
Instance Method Details
#columns ⇒ Object
8 9 10 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 8 def columns @yaml_model[:columns] end |
#description ⇒ Object
25 26 27 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 25 def description @yaml_model[:description] end |
#group_name ⇒ Object
21 22 23 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 21 def group_name @yaml_model[:group] end |
#parsed_columns ⇒ Object
12 13 14 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 12 def parsed_columns @yaml_model[:parsed_columns] end |
#relations ⇒ Object
16 17 18 19 |
# File 'lib/yaml2erd/er_yaml_model.rb', line 16 def relations # TODO: 同じassociationのtypeまとめる形の方がいいかも yamlの構造を変えるかここで変換するか @yaml_model[:relations] end |