Class: LittleGhost::FrameworkPrompts::Reference

Inherits:
Data
  • Object
show all
Defined in:
lib/little_ghost/framework_prompts.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key:, locals: {}) ⇒ Reference

Returns a new instance of Reference.



83
84
85
# File 'lib/little_ghost/framework_prompts.rb', line 83

def initialize(key:, locals: {})
  super(key: String(key).freeze, locals: FrameworkPrompts.immutable_copy(locals))
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key

Returns:

  • (Object)

    the current value of key



82
83
84
# File 'lib/little_ghost/framework_prompts.rb', line 82

def key
  @key
end

#localsObject (readonly)

Returns the value of attribute locals

Returns:

  • (Object)

    the current value of locals



82
83
84
# File 'lib/little_ghost/framework_prompts.rb', line 82

def locals
  @locals
end