Class: Diecut::PluginDescription::ContextDefault

Inherits:
Struct
  • Object
show all
Defined in:
lib/diecut/plugin-description/context-default.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blockObject

Returns the value of attribute block

Returns:

  • (Object)

    the current value of block



3
4
5
# File 'lib/diecut/plugin-description/context-default.rb', line 3

def block
  @block
end

#context_pathObject

Returns the value of attribute context_path

Returns:

  • (Object)

    the current value of context_path



3
4
5
# File 'lib/diecut/plugin-description/context-default.rb', line 3

def context_path
  @context_path
end

#valueObject

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



3
4
5
# File 'lib/diecut/plugin-description/context-default.rb', line 3

def value
  @value
end

Instance Method Details

#compute_value(context) ⇒ Object



8
9
10
# File 'lib/diecut/plugin-description/context-default.rb', line 8

def compute_value(context)
  block.call(context)
end

#simple?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/diecut/plugin-description/context-default.rb', line 4

def simple?
  value != NO_VALUE
end