Class: Blueprint::ConceptDesignContext
- Inherits:
-
DesignContext
- Object
- DesignContext
- Blueprint::ConceptDesignContext
- Defined in:
- lib/blueprint/api/rails.rb
Instance Method Summary collapse
-
#describe(description = nil, stereotype = nil) ⇒ Object
applies a description to the (conceptual) element.
-
#initialize(api_key, structure_id, name) ⇒ ConceptDesignContext
constructor
A new instance of ConceptDesignContext.
Methods inherited from DesignContext
Constructor Details
#initialize(api_key, structure_id, name) ⇒ ConceptDesignContext
Returns a new instance of ConceptDesignContext.
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/blueprint/api/rails.rb', line 224 def initialize(api_key, structure_id, name) @api_key = api_key @structure_id = structure_id @instance_id = SecureRandom.uuid @name = name # initialise faraday @conn = Faraday.new(:url => BLUEPRINT_SERVER) do |faraday| # faraday.response :logger # log requests to STDOUT faraday.adapter Faraday.default_adapter # make requests with Net::HTTP end # we register the concept immediately (so that it appears even though it has no description / messages) self.send DESCRIBE_CONCEPT, { :name => @name } end |
Instance Method Details
#describe(description = nil, stereotype = nil) ⇒ Object
applies a description to the (conceptual) element
244 245 246 247 248 249 250 251 252 |
# File 'lib/blueprint/api/rails.rb', line 244 def describe(description = nil, stereotype = nil) self.send DESCRIBE_CONCEPT, { :name => @name, :description => description, :stereotype => stereotype } self end |