Class: JsonSchema::Artesano::Hand
- Inherits:
-
Object
- Object
- JsonSchema::Artesano::Hand
- Defined in:
- lib/json_schema/artesano/hand.rb
Constant Summary collapse
- PRIMITIVE_MATERIALS =
%w{null boolean number string integer}.freeze
Instance Attribute Summary collapse
-
#tool ⇒ Object
readonly
Returns the value of attribute tool.
Instance Method Summary collapse
-
#initialize(tool: Tools::Static) ⇒ Hand
constructor
A new instance of Hand.
- #mold(sketch) ⇒ Object
- #use_tool(tool) ⇒ Object
Constructor Details
#initialize(tool: Tools::Static) ⇒ Hand
Returns a new instance of Hand.
18 19 20 |
# File 'lib/json_schema/artesano/hand.rb', line 18 def initialize(tool: Tools::Static) self.use_tool(tool) end |
Instance Attribute Details
#tool ⇒ Object (readonly)
Returns the value of attribute tool.
16 17 18 |
# File 'lib/json_schema/artesano/hand.rb', line 16 def tool @tool end |
Instance Method Details
#mold(sketch) ⇒ Object
26 27 28 |
# File 'lib/json_schema/artesano/hand.rb', line 26 def mold(sketch) transform( material(sketch) ) end |
#use_tool(tool) ⇒ Object
22 23 24 |
# File 'lib/json_schema/artesano/hand.rb', line 22 def use_tool(tool) @tool = tool.new end |