Class: Blueprints::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/blueprints/context.rb

Overview

Class that blueprint blocks are evaluated against. Allows you to access options that were passed to build method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



4
5
6
# File 'lib/blueprints/context.rb', line 4

def attributes
  @attributes
end

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/blueprints/context.rb', line 4

def options
  @options
end

Instance Method Details

#build(*names) ⇒ Object

Method that allows building one blueprint inside of another. Simply delegates to root namespace.



7
8
9
# File 'lib/blueprints/context.rb', line 7

def build(*names)
  Namespace.root.build(*names)
end