Class: Catechism::DescribeBlock

Inherits:
Struct
  • Object
show all
Defined in:
lib/catechism/describe_block.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#descriptionObject

Returns the value of attribute description

Returns:

  • (Object)

    the current value of description



3
4
5
# File 'lib/catechism/describe_block.rb', line 3

def description
  @description
end

Instance Method Details

#it(description, &block) ⇒ Object



4
5
6
# File 'lib/catechism/describe_block.rb', line 4

def it(description, &block)
  Catechism::ItBlock.new(description, self).instance_eval(&block) if block_given?
end