Class: Kumi::Dev::GoldenV2::Representation
- Inherits:
-
Struct
- Object
- Struct
- Kumi::Dev::GoldenV2::Representation
- Defined in:
- lib/kumi/dev/golden_v2.rb
Instance Attribute Summary collapse
-
#extension ⇒ Object
Returns the value of attribute extension.
-
#generator_method ⇒ Object
Returns the value of attribute generator_method.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
Instance Attribute Details
#extension ⇒ Object
Returns the value of attribute extension
10 11 12 |
# File 'lib/kumi/dev/golden_v2.rb', line 10 def extension @extension end |
#generator_method ⇒ Object
Returns the value of attribute generator_method
10 11 12 |
# File 'lib/kumi/dev/golden_v2.rb', line 10 def generator_method @generator_method end |
#name ⇒ Object
Returns the value of attribute name
10 11 12 |
# File 'lib/kumi/dev/golden_v2.rb', line 10 def name @name end |
Instance Method Details
#filename ⇒ Object
11 12 13 |
# File 'lib/kumi/dev/golden_v2.rb', line 11 def filename "#{name}.#{extension}" end |
#generate(schema_path) ⇒ Object
15 16 17 18 19 |
# File 'lib/kumi/dev/golden_v2.rb', line 15 def generate(schema_path) raise "Unknown generator method: #{generator_method}" unless PrettyPrinter.respond_to?(generator_method) PrettyPrinter.public_send(generator_method, schema_path) end |