Class: Hemi::Render::Texture
- Inherits:
-
Object
- Object
- Hemi::Render::Texture
- Defined in:
- lib/hemi/render/texture.rb
Constant Summary collapse
- ERR__INVALID_POSITION =
"Ivalid position.".freeze
Instance Attribute Summary collapse
-
#texture ⇒ Object
readonly
Returns the value of attribute texture.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Texture
constructor
A new instance of Texture.
- #render ⇒ Object
Constructor Details
#initialize ⇒ Texture
Returns a new instance of Texture.
5 6 7 |
# File 'lib/hemi/render/texture.rb', line 5 def initialize raise NotImplementedError end |
Instance Attribute Details
#texture ⇒ Object (readonly)
Returns the value of attribute texture.
9 10 11 |
# File 'lib/hemi/render/texture.rb', line 9 def texture @texture end |
Class Method Details
.[](name) ⇒ Object
20 21 22 |
# File 'lib/hemi/render/texture.rb', line 20 def [](name) public_send(bucket)[name] || new(name) end |
.bucket ⇒ Object
28 29 30 |
# File 'lib/hemi/render/texture.rb', line 28 def bucket raise NotImplementedError end |
.purge! ⇒ Object
24 25 26 |
# File 'lib/hemi/render/texture.rb', line 24 def purge! instance_variable_set "@#{bucket}", {} end |
.register(name, texture) ⇒ Object
16 17 18 |
# File 'lib/hemi/render/texture.rb', line 16 def register(name, texture) public_send(bucket)[name] ||= texture end |
Instance Method Details
#render ⇒ Object
11 12 13 |
# File 'lib/hemi/render/texture.rb', line 11 def render raise NotImplementedError end |