Class: Agave::Dump::Dsl::Directory

Inherits:
Object
  • Object
show all
Includes:
AddToDataFile, CreateDataFile, CreatePost
Defined in:
lib/agave/dump/dsl/directory.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AddToDataFile

#add_to_data_file

Methods included from CreatePost

#create_post

Methods included from CreateDataFile

#create_data_file

Constructor Details

#initialize(agave, operations, &block) ⇒ Directory

Returns a new instance of Directory.



16
17
18
19
20
21
22
# File 'lib/agave/dump/dsl/directory.rb', line 16

def initialize(agave, operations, &block)
  @agave = agave
  @operations = operations
  @self_before_instance_eval = eval 'self', block.binding

  instance_eval(&block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



24
25
26
# File 'lib/agave/dump/dsl/directory.rb', line 24

def method_missing(method, *args, &block)
  @self_before_instance_eval.send method, *args, &block
end

Instance Attribute Details

#agaveObject (readonly)

Returns the value of attribute agave.



14
15
16
# File 'lib/agave/dump/dsl/directory.rb', line 14

def agave
  @agave
end

#operationsObject (readonly)

Returns the value of attribute operations.



14
15
16
# File 'lib/agave/dump/dsl/directory.rb', line 14

def operations
  @operations
end