Class: Motoko::Resolvers::Fact
- Inherits:
-
BaseResolver
- Object
- BaseResolver
- Motoko::Resolvers::Fact
- Defined in:
- lib/motoko/resolvers/fact.rb
Instance Attribute Summary collapse
-
#fact ⇒ Object
Returns the value of attribute fact.
Attributes inherited from BaseResolver
#formatter, #human_name, #name
Instance Method Summary collapse
-
#initialize(name, options) ⇒ Fact
constructor
A new instance of Fact.
- #resolve_for(node) ⇒ Object
Methods inherited from BaseResolver
Methods included from Utils::SnakeToCamel
Constructor Details
#initialize(name, options) ⇒ Fact
Returns a new instance of Fact.
8 9 10 11 12 |
# File 'lib/motoko/resolvers/fact.rb', line 8 def initialize(name, ) @fact = .delete('fact') || name super end |
Instance Attribute Details
#fact ⇒ Object
Returns the value of attribute fact.
6 7 8 |
# File 'lib/motoko/resolvers/fact.rb', line 6 def fact @fact end |
Instance Method Details
#resolve_for(node) ⇒ Object
14 15 16 |
# File 'lib/motoko/resolvers/fact.rb', line 14 def resolve_for(node) node.fact(fact) end |