Class: Kumi::Dev::GoldenV2::Representation

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/dev/golden_v2.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#extensionObject

Returns the value of attribute extension

Returns:

  • (Object)

    the current value of extension



10
11
12
# File 'lib/kumi/dev/golden_v2.rb', line 10

def extension
  @extension
end

#generator_methodObject

Returns the value of attribute generator_method

Returns:

  • (Object)

    the current value of generator_method



10
11
12
# File 'lib/kumi/dev/golden_v2.rb', line 10

def generator_method
  @generator_method
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



10
11
12
# File 'lib/kumi/dev/golden_v2.rb', line 10

def name
  @name
end

Instance Method Details

#filenameObject



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