Class: Cukunity::Unity::Hint
- Inherits:
-
JSONContainer
- Object
- JSONContainer
- Cukunity::Unity::Hint
- Includes:
- ScreenHintMethods, TextHintMethods
- Defined in:
- lib/cukunity/unity/hint.rb
Instance Attribute Summary collapse
-
#component ⇒ Object
readonly
Returns the value of attribute component.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Attributes inherited from JSONContainer
Instance Method Summary collapse
- #gameobject ⇒ Object
-
#initialize(json, type, component) ⇒ Hint
constructor
A new instance of Hint.
- #to_s ⇒ Object
Methods included from TextHintMethods
#reads_as?, #reads_like?, #text
Methods included from ScreenHintMethods
#intersects?, #on_screen?, #rect, #screen_pos, #tap
Methods inherited from JSONContainer
#has_key?, #keys, #method_missing, #value_of
Methods included from Cukunity::Utils
#check_timeout, #merge_options, #restrict_options, #to_options, #wait_connectivity
Constructor Details
#initialize(json, type, component) ⇒ Hint
Returns a new instance of Hint.
11 12 13 14 15 16 |
# File 'lib/cukunity/unity/hint.rb', line 11 def initialize(json, type, component) super(json) @type = type @value = json @component = component end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Cukunity::Unity::JSONContainer
Instance Attribute Details
#component ⇒ Object (readonly)
Returns the value of attribute component.
7 8 9 |
# File 'lib/cukunity/unity/hint.rb', line 7 def component @component end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
8 9 10 |
# File 'lib/cukunity/unity/hint.rb', line 8 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
9 10 11 |
# File 'lib/cukunity/unity/hint.rb', line 9 def value @value end |
Instance Method Details
#gameobject ⇒ Object
18 19 20 |
# File 'lib/cukunity/unity/hint.rb', line 18 def gameobject component.gameobject end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/cukunity/unity/hint.rb', line 22 def to_s { type.to_s => json }.to_s end |