Class: Clowne::Declarations::Nullify

Inherits:
Base
  • Object
show all
Defined in:
lib/clowne/declarations/nullify.rb

Overview

:nodoc: all

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#matches?

Constructor Details

#initialize(*attributes) ⇒ Nullify

Returns a new instance of Nullify.

Raises:

  • (ArgumentError)


8
9
10
11
12
# File 'lib/clowne/declarations/nullify.rb', line 8

def initialize(*attributes)
  raise ArgumentError, 'At least one attribute required' if attributes.empty?

  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



6
7
8
# File 'lib/clowne/declarations/nullify.rb', line 6

def attributes
  @attributes
end

Instance Method Details

#compile(plan) ⇒ Object



14
15
16
# File 'lib/clowne/declarations/nullify.rb', line 14

def compile(plan)
  plan.add(:nullify, self)
end