Class: RedSnow::Sourcemap::Action
- Defined in:
- lib/redsnow/sourcemap.rb
Overview
Action source map node
Instance Attribute Summary collapse
-
#examples ⇒ Array<TransactionExample>
action transaction examples.
-
#method ⇒ Sourcemap
HTTP request method or nil.
-
#parameters ⇒ Parameters
action-specific URI parameters or nil.
Attributes inherited from NamedNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(sourcemap) ⇒ Action
constructor
A new instance of Action.
Constructor Details
#initialize(sourcemap) ⇒ Action
Returns a new instance of Action.
178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/redsnow/sourcemap.rb', line 178 def initialize(sourcemap) return if sourcemap.nil? super(sourcemap) @method = SourceMap.new(sourcemap['method']) @parameters = Parameters.new(sourcemap['parameters']) @examples = [] sourcemap.key?('examples') && sourcemap['examples'].each do |example| @examples << TransactionExample.new(example) end end |
Instance Attribute Details
#examples ⇒ Array<TransactionExample>
action transaction examples
172 173 174 |
# File 'lib/redsnow/sourcemap.rb', line 172 def examples @examples end |
#method ⇒ Sourcemap
HTTP request method or nil
172 173 174 |
# File 'lib/redsnow/sourcemap.rb', line 172 def method @method end |
#parameters ⇒ Parameters
action-specific URI parameters or nil
172 173 174 |
# File 'lib/redsnow/sourcemap.rb', line 172 def parameters @parameters end |