Class: EverydayThorUtil::BuilderBuildLists::BuilderFlags

Inherits:
Object
  • Object
show all
Defined in:
lib/everyday_thor_util/builder.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent) ⇒ BuilderFlags

Returns a new instance of BuilderFlags.



112
113
114
115
# File 'lib/everyday_thor_util/builder.rb', line 112

def initialize(parent)
  @parent = parent
  @flags  = {}
end

Instance Method Details

#[](name) ⇒ Object



121
122
123
# File 'lib/everyday_thor_util/builder.rb', line 121

def [](name)
  @flags[name.to_sym]
end

#[]=(name, flag) ⇒ Object



125
126
127
128
129
130
131
132
# File 'lib/everyday_thor_util/builder.rb', line 125

def []=(name, flag)
  if flag.nil?
    self.delete(name)
    nil
  else
    @flags[name.to_sym] = flag
  end
end

#delete(name) ⇒ Object



138
139
140
# File 'lib/everyday_thor_util/builder.rb', line 138

def delete(name)
  @flags.delete(name.to_sym)
end

#flagsObject



117
118
119
# File 'lib/everyday_thor_util/builder.rb', line 117

def flags
  @flags
end

#has_key?(name) ⇒ Boolean

Returns:

  • (Boolean)


134
135
136
# File 'lib/everyday_thor_util/builder.rb', line 134

def has_key?(name)
  @flags.has_key?(name.to_sym)
end