Class: HammerCLI::Output::Dsl

Inherits:
Object
  • Object
show all
Defined in:
lib/hammer_cli/output/dsl.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Dsl

Returns a new instance of Dsl.



5
6
7
# File 'lib/hammer_cli/output/dsl.rb', line 5

def initialize(options={})
  @current_path = options[:path] || []
end

Instance Method Details

#build(&block) ⇒ Object



14
15
16
# File 'lib/hammer_cli/output/dsl.rb', line 14

def build(&block)
  self.instance_eval(&block)
end

#fieldsObject



9
10
11
12
# File 'lib/hammer_cli/output/dsl.rb', line 9

def fields
  @fields ||= []
  @fields
end