Class: Aspector::AdviceMetadata

Inherits:
Object
  • Object
show all
Defined in:
lib/aspector/advice_metadata.rb

Constant Summary collapse

BEFORE =
new Aspector::Advice::BEFORE, nil, :skip_if_false => false
BEFORE_FILTER =
new Aspector::Advice::BEFORE, nil, :skip_if_false => true
AFTER =
new Aspector::Advice::AFTER,  { :result_arg => true }, nil
AROUND =
new Aspector::Advice::AROUND, nil, nil
RAW =
new Aspector::Advice::RAW, nil, nil

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(advice_type, default_options, mandatory_options) ⇒ AdviceMetadata

Returns a new instance of AdviceMetadata.



5
6
7
8
9
# File 'lib/aspector/advice_metadata.rb', line 5

def initialize advice_type, default_options, mandatory_options
  @advice_type       = advice_type
  @default_options   = default_options   || {}
  @mandatory_options = mandatory_options || {}
end

Instance Attribute Details

#advice_typeObject (readonly)

Returns the value of attribute advice_type.



3
4
5
# File 'lib/aspector/advice_metadata.rb', line 3

def advice_type
  @advice_type
end

#default_optionsObject (readonly)

Returns the value of attribute default_options.



3
4
5
# File 'lib/aspector/advice_metadata.rb', line 3

def default_options
  @default_options
end

#mandatory_optionsObject (readonly)

Returns the value of attribute mandatory_options.



3
4
5
# File 'lib/aspector/advice_metadata.rb', line 3

def mandatory_options
  @mandatory_options
end