Class: SchemaExtractor::Schema
- Inherits:
-
Object
- Object
- SchemaExtractor::Schema
- Defined in:
- lib/schema_extractor/schema.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #add(field) ⇒ Object
-
#initialize(name) ⇒ Schema
constructor
A new instance of Schema.
Constructor Details
#initialize(name) ⇒ Schema
8 9 10 11 |
# File 'lib/schema_extractor/schema.rb', line 8 def initialize(name) @name = name @fields = [] end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
5 6 7 |
# File 'lib/schema_extractor/schema.rb', line 5 def fields @fields end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/schema_extractor/schema.rb', line 6 def name @name end |
Instance Method Details
#add(field) ⇒ Object
13 14 15 |
# File 'lib/schema_extractor/schema.rb', line 13 def add(field) fields.push(field) end |