Class: Dato::Dump::Dsl::Directory

Inherits:
Object
  • Object
show all
Includes:
AddToDataFile, CreateDataFile, CreatePost
Defined in:
lib/dato/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(dato, operations, &block) ⇒ Directory

Returns a new instance of Directory.



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

def initialize(dato, operations, &block)
  @dato = dato
  @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



25
26
27
# File 'lib/dato/dump/dsl/directory.rb', line 25

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

Instance Attribute Details

#datoObject (readonly)

Returns the value of attribute dato.



15
16
17
# File 'lib/dato/dump/dsl/directory.rb', line 15

def dato
  @dato
end

#operationsObject (readonly)

Returns the value of attribute operations.



15
16
17
# File 'lib/dato/dump/dsl/directory.rb', line 15

def operations
  @operations
end