class ColonelKurtz::Block::Data

Attributes

data[R]

Public Class Methods

new(data) click to toggle source
# File lib/colonel_kurtz/block/data.rb, line 11
def initialize(data)
  @data = data
end

Public Instance Methods

to_hash() click to toggle source
# File lib/colonel_kurtz/block/data.rb, line 15
def to_hash
  defined?(HashWithIndifferentAccess) ? with_indifferent_access(data) : data
end

Private Instance Methods

with_indifferent_access(hash) click to toggle source
# File lib/colonel_kurtz/block/data.rb, line 22
def with_indifferent_access(hash)
  HashWithIndifferentAccess.new(hash)
end