Class: PBRT::Builder::NamedMaterial

Inherits:
Object
  • Object
show all
Defined in:
lib/pbrt/builder/named_material.rb

Instance Method Summary collapse

Constructor Details

#initialize(builder, name) ⇒ NamedMaterial

Returns a new instance of NamedMaterial.



4
5
6
7
# File 'lib/pbrt/builder/named_material.rb', line 4

def initialize(builder, name)
  @builder = builder
  @name = name
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



9
10
11
# File 'lib/pbrt/builder/named_material.rb', line 9

def method_missing(method, *args)
  Material.new(self).public_send(method, *args)
end

Instance Method Details

#write(statement) ⇒ Object



13
14
15
# File 'lib/pbrt/builder/named_material.rb', line 13

def write(statement)
  @builder.write(modified(statement))
end